Marcelino Deseo
Marcelino Deseo
In version 1.0.1, the last semicolon in a one liner function causes a parser error _unclosed INDENT on line 1_. ``` greet = (name) -> "hello #{name}"; ``` Is this...
something like this ``` counter = (start = 0, step = 1) -> idx = start while true yield idx idx += step countFrom10 = counter 10 countFrom10() # returns...
I've tried the following expression ``` 'a' in ['a'...'z'] ``` and a JavaScript code was generated. However, when I ran it on Try CoffeeScript, it appears to run indefinitely.
Where can I find a compilation of design principles behind CoffeeScript, just like Zen of Python. One the core principle is this one (straight from the home page) - The...
The CoffeeScript below will return an empty Array due to `break` statement. The `continue` statement has the same effect. ``` # CoffeeScript a = for item in [1...10] if item...
Honestly, I could not think of a realistic use case for the use of destructuring compound assignment, but personally, I think it's a good idea, hence I posted it. ```...
I wonder if `extends` can be used apart from declaring class. The following code worked, through I doubt if `extends` should be used apart from class declaration. ``` A =...
In JS, the length of the function "Specifies the number of arguments expected by the function. "[1], hence ``` f3 = (a, b, c) -> f1 = (a) -> f0...
``` x = 1 # to force embebded js after the declaration of __extends `__extends = function(){}` # breaks __extends functionality class S extends Array console.log (new S).push.toString() ``` This...
``` # CS switch when "A" then console.log "Hi" else console.log "Bye" // Generated JS switch (false) { case !"A": console.log("Hi"); break; default: console.log("Bye"); } ``` CS should report this...