CoffeeScript: Difference between revisions

Content deleted Content added
I moved some stuff down bc I was going to add a paragraph on how js has incorporated many features in coffeescript, but that paragraph should probably go under "Adoption"...
Line 32:
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.
 
To compute the [[body mass index]], one may do (here in [[JavaScript]]), one could write:
 
<syntaxhighlight lang="javascript">
Line 50:
</syntaxhighlight>
 
To compute the [[greatest common divisor]] of two integers with the [[euclideanEuclidean algorithm]], in JavaScript one usually needs a ''while'' loop:
 
<syntaxhighlight lang="javascript">