Fixed comparisons section

It was a mistake with `===` operator: `~=` is the equivalent for `==`, not `===` that is a more useful^([citation needed]) version of JS's `===`.
This commit is contained in:
Gustavo Rodrigues 2013-10-01 09:10:27 -03:00
parent 42a2263ab1
commit 97d15053e2

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 >=