coffeescript
Version:
Unfancy JavaScript
29 lines (18 loc) • 445 B
text/coffeescript
result = try
nonexistent * missing
catch error
true
result2 = try nonexistent * missing catch error then true
ok result is true and result2 is true
getX = -> 10
if x = getX() then 100
ok x is 10
x = if getX() then 100
ok x is 100
# This-assignment.
tester = ->
@example = -> 'example function'
this
ok tester().example() is 'example function'