mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Docs shorthand object notation (#4356)
* Docs shorthand object notation A simple but slightly more imaginative example of shorthand object notation. Closes #1808. Signed-off-by: Daniel Bayley <daniel.bayley@me.com> * Update for new documentation folder structure * Fix typo
This commit is contained in:
parent
cc3be717a0
commit
6c759d49bd
2 changed files with 10 additions and 0 deletions
5
documentation/examples/objects_shorthand.coffee
Normal file
5
documentation/examples/objects_shorthand.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = "Michelangelo"
|
||||
mask = "orange"
|
||||
weapon = "nunchuks"
|
||||
turtle = {name, mask, weapon}
|
||||
output = "#{turtle.name} wears an #{turtle.mask} mask. Watch out for his #{turtle.weapon}!"
|
Loading…
Add table
Add a link
Reference in a new issue