mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
23 lines
301 B
CoffeeScript
23 lines
301 B
CoffeeScript
print(if my_special_variable? then false else true)
|
|
|
|
my_special_variable: false
|
|
|
|
print(if my_special_variable? then true else false)
|
|
|
|
|
|
# Existential assignment.
|
|
|
|
a: 5
|
|
a: null
|
|
a ?= 10
|
|
b ?= 10
|
|
|
|
print(a is 10 and b is 10)
|
|
|
|
|
|
# The existential operator.
|
|
|
|
z: null
|
|
x: z ? "EX"
|
|
|
|
print(z is null and x is "EX") |