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