mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Merge branch 'master' of https://github.com/adambard/learnxinyminutes-docs
This commit is contained in:
commit
ddcab09ff8
@ -49,11 +49,24 @@ False
|
|||||||
not True #=> False
|
not True #=> False
|
||||||
not False #=> True
|
not False #=> True
|
||||||
|
|
||||||
|
|
||||||
# Equality is ==
|
# Equality is ==
|
||||||
1 == 1 #=> True
|
1 == 1 #=> True
|
||||||
2 == 1 #=> False
|
2 == 1 #=> False
|
||||||
|
|
||||||
|
# Inequality is !=
|
||||||
|
1 != 1 #=> False
|
||||||
|
2 != 1 #=> True
|
||||||
|
|
||||||
|
# More comparisons
|
||||||
|
1 < 10 #=> True
|
||||||
|
1 > 10 #=> False
|
||||||
|
2 <= 2 #=> True
|
||||||
|
2 >= 2 #=> True
|
||||||
|
|
||||||
|
# Comparisons can be chained !
|
||||||
|
1 < 2 < 3 #=> True
|
||||||
|
2 < 3 < 2 #=> False
|
||||||
|
|
||||||
# Strings are created with " or '
|
# Strings are created with " or '
|
||||||
"This is a string."
|
"This is a string."
|
||||||
'This is also a string.'
|
'This is also a string.'
|
||||||
|
Loading…
Reference in New Issue
Block a user