jamiebuilds / ghost-lang

:ghost: A friendly little language for you and me.
302 stars 10 forks source link

Ternary operator #20

Closed aleclarson closed 6 years ago

aleclarson commented 6 years ago

Thoughts?

# use `b` if `a` is truthy, else use `c`
let foo = a ? b : c

# use `b` if `a` is null, else use `a`
let bar = a ?? b
jamiebuilds commented 6 years ago

Trying to encourage vertical space instead of horizontal