mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00

* Changelog for 2.1.0; remove text from objects section that is no longer valid for CS2/ES2015. * Update packages * 2.1.0 build * Update output * Correct reference to `//` division, per https://github.com/coffeescript6/discuss/issues/39#issuecomment-347144647
510 B
510 B
Objects and Arrays
The CoffeeScript literals for objects and arrays look very similar to their JavaScript cousins. When each property is listed on its own line, the commas are optional. Objects may be created using indentation instead of explicit braces, similar to YAML.
codeFor('objects_and_arrays', 'song.join(" … ")')
CoffeeScript has a shortcut for creating objects when you want the key to be set with a variable of the same name.
codeFor('objects_shorthand')