jashkenas--coffeescript/documentation/examples/objects_shorthand.coffee

6 lines
180 B
CoffeeScript

name = "Michelangelo"
mask = "orange"
weapon = "nunchuks"
turtle = {name, mask, weapon}
output = "#{turtle.name} wears an #{turtle.mask} mask. Watch out for his #{turtle.weapon}!"