It adds syntactic sugar inspired by Ruby, Python, and Haskell in an effort to enhance JavaScript's brevity and readability.
By that time the project had attracted several other contributors on GitHub, and was receiving over 300 page hits per day.
As in Perl and Ruby, these control statements also have postfix versions; for example, if can also be written in consequent if condition form.
A common pre-ES6 JavaScript snippet using the jQuery library is: Or even just: In CoffeeScript, the function keyword is replaced by the -> symbol, and indentation is used instead of curly braces, as in other off-side rule languages such as Python and Haskell.
These additions simplify asynchronous control flow, making the code look more like a procedural programming language, eliminating the call-back chain.
[19] On September 13, 2012, Dropbox announced that their browser-side code base had been rewritten from JavaScript to CoffeeScript,[20] however it was migrated to TypeScript in 2017.
[21] GitHub's internal style guide once said "write new JS in CoffeeScript", though it no longer does,[22] and their Atom text editor was also written in the language, with configuration written in CSON ("CoffeeScript Object Notation"), a variant of JSON.