mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
19 lines
361 B
CoffeeScript
19 lines
361 B
CoffeeScript
result: try
|
|
nonexistent * missing
|
|
catch error
|
|
true
|
|
|
|
result2: try nonexistent * missing catch error then true
|
|
|
|
ok result is true and result2 is true, 'can assign the result of a try/catch block'
|
|
|
|
|
|
get_x: -> 10
|
|
|
|
if x: get_x() then 100
|
|
|
|
ok x is 10, 'can assign a conditional statement'
|
|
|
|
x: if get_x() then 100
|
|
|
|
ok x is 100, 'can assign a conditional statement' |