CoffeeScript: Difference between revisions

Content deleted Content added
m Disambiguating links to Live script (link changed to LiveScript (programming language); link changed to LiveScript (programming language)) using DisamAssist.
Maxlath (talk | contribs)
Syntax: repeating the Ruby influence
Line 29:
 
== Syntax ==
Almost everything is an [[expression (computer science)|expression]] in CoffeeScript, for example, <code>if</code>, <code>switch</code> and <code>for</code> expressions (which have no return value in JavaScript) return a value. As in [[Perl]] and Ruby, these control statements also have postfix versions; for example, <code>if</code> can also be written in <code> consequent if condition</code> form.
 
Many unnecessary parentheses and braces can be omitted; for example, blocks of code can be denoted by indentation instead of braces, function calls are implicit, and object literals are often detected automatically.