1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-02-07 00:31:56 +01:00

Merge pull request #372 from qgustavor/patch-1

[livescript/en] Fixed comparisons section
This commit is contained in:
Adam Bard 2013-10-09 09:21:33 -07:00
commit d4c6c8605a

View File

@ -135,11 +135,19 @@ funRE = //
3 % 2 # => 1
# Comparisons are mostly the same too, except that `==` and `===` are
# inverted.
# Comparisons are mostly the same too, except that `==` is the same as
# JS's `===`, where JS's `==` in LiveScript is `~=`, and `===` enables
# object and array comparisons, and also stricter comparisons:
2 == 2 # => true
2 == "2" # => false
2 === "2" # => true
2 ~= "2" # => true
2 === "2" # => false
[1,2,3] == [1,2,3] # => false
[1,2,3] === [1,2,3] # => true
+0 == -0 # => true
+0 === -0 # => false
# Other relational operators include <, <=, > and >=