2010-01-16 16:37:49 -05:00
|
|
|
# CoffeeScript's operations should be chainable, like Python's.
|
|
|
|
|
2010-02-16 19:45:25 -05:00
|
|
|
ok 500 > 50 > 5 > -5
|
2010-01-16 16:37:49 -05:00
|
|
|
|
2010-02-16 19:45:25 -05:00
|
|
|
ok true is not false is true is not false
|
2010-01-16 16:37:49 -05:00
|
|
|
|
2010-03-06 23:48:06 -05:00
|
|
|
ok 0 is 0 isnt 50 is 50
|
|
|
|
|
2010-02-16 19:45:25 -05:00
|
|
|
ok 10 < 20 > 10
|
2010-01-16 16:37:49 -05:00
|
|
|
|
2010-02-16 19:45:25 -05:00
|
|
|
ok 50 > 10 > 5 is parseInt('5', 10)
|
2010-01-16 22:04:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
# Make sure that each argument is only evaluated once, even if used
|
|
|
|
# more than once.
|
|
|
|
|
|
|
|
i: 0
|
2010-01-26 10:52:05 -05:00
|
|
|
func: -> i++
|
2010-01-16 22:04:08 -05:00
|
|
|
|
2010-02-16 19:45:25 -05:00
|
|
|
ok 1 > func() < 1
|