can use until instead: gcd = (x, y) -> [x, y] = [y, x%y] until y is 0 x The ? keyword quickly checks if a variable is null or undefined : personCheck = -> if not person? then alert("No person") else alert("Have person") person = null personCheck() person = "Ivan" personCheck() This would alert "No person" if the variable is null or undefined and "Have person" if there is something there. A common pre-es6 JavaScript snippet using the jQuery library is: $(document).ready(function() { // Initialization code goes here }) Or even just: $(function() { // Initialization code goes here }) 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. Also, parentheses can usually be omitted, using indentation level instead to denote a function or block. Thus, the CoffeeScript equivalent of the snippet above is: $(document).ready -> # Initialization code goes here Or just: $ -> # Initialization code goes here Ruby-style string interpolation is included in CoffeeScript. Double-quoted strings allow for interpolated values, using #{ ... }, and single-quoted strings are literal. author = "Wittgenstein" quote = "A picture is a fact. -- #{ author }" sentence = "#{ 22 / 7 } is a decent approximation of π" Any for loop can be replaced by a list comprehension; so that to compute the squares of the positive odd numbers smaller than ten (i.e. numbers whose remainder modulo 2 is 1), one can do: alert n*n for n in [1..10] when n%2 is 1 Alternatively, there is: alert n*n for n in [1..10] by 2 A linear search can be implemented with a one-liner using the when keyword: names = ["Ivan", "Joanna", "Nikolay", "Mihaela"] linearSearch = (searchName) -> alert(name) for name in names when name is searchName The for ... in syntax allows looping over arrays while the for ... of syntax allows looping over objects. CoffeeScript has been criticized for its unusual scoping rules. In particular, it completely disallows variable shadowing which makes reasoning about code more difficult and error-prone in some basic programming patterns established by and taken for granted since procedural programming principles were defined. For example, with the following code snippet in JavaScript one does not have to look outside the {}-block to know for sure that no possible foo variable in the outer