Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
8 Cards in this Set
- Front
- Back
== |
Checks if the value of two operands are equal or not, if yes then condition becomes true. Example (a == b) is not true. |
|
!= |
Checks if the value of two operands are equal or not, if values are not equal then condition becomes true. Example (a != b) is true (a != a) is false |
|
>= |
Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. Example (a >= b) is not true |
|
<= |
Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true. Example (a <= b) is true |
|
<=> |
Combined comparison operator. Returns 0 if first operand equals second, 1 if first operand is greater than the second and -1 if first operand is less than the second. Example (a <=> b) returns -1 |
|
=== |
Used to test equality within a when clause of a case statement. Example (1...10) === 5 returns true |
|
.eql? |
True if the receiver and argument have both the same type and equal values. Example 1 == 1.0 returns true, but 1.eql?(1.0) is false. |
|
equal? |
True if the receiver and argument have the same object id. Example if aObj is duplicate of bObj then aObj == bObj is true, a.equal?bObj is false but a.equal?aObj is true. |