mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
commit
5e1d66c5b7
@ -43,17 +43,18 @@ false.class #=> FalseClass
|
||||
1 == 1 #=> true
|
||||
2 == 1 #=> false
|
||||
|
||||
# apart from false itself, nil is the only other 'falsey' value
|
||||
|
||||
nil == false #=> true
|
||||
0 == false #=> false
|
||||
|
||||
# Inequality
|
||||
1 != 1 #=> false
|
||||
2 != 1 #=> true
|
||||
!true #=> false
|
||||
!false #=> true
|
||||
|
||||
# apart from false itself, nil is the only other 'falsey' value
|
||||
|
||||
!nil #=> true
|
||||
!false #=> true
|
||||
!0 #=> false
|
||||
|
||||
# More comparisons
|
||||
1 < 10 #=> true
|
||||
1 > 10 #=> false
|
||||
|
Loading…
Reference in New Issue
Block a user