mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
44 lines
439 B
CoffeeScript
44 lines
439 B
CoffeeScript
a: b: d: true
|
|
c: false
|
|
|
|
result: if a
|
|
if b
|
|
if c then false else
|
|
if d
|
|
true
|
|
|
|
ok result
|
|
|
|
|
|
first: if false then false else second: if false then false else true
|
|
|
|
ok first
|
|
ok second
|
|
|
|
|
|
result: if false
|
|
false
|
|
else if NaN
|
|
false
|
|
else
|
|
true
|
|
|
|
ok result
|
|
|
|
|
|
# If statement with a comment-only clause.
|
|
result: if false
|
|
# comment
|
|
else
|
|
27
|
|
|
|
ok result is 27
|
|
|
|
|
|
# Testing unless.
|
|
result: unless true
|
|
10
|
|
else
|
|
11
|
|
|
|
ok result is 11
|