This little CoffeeScript contains a typo
drinks = "Coffee" drinks = drinks + ", " + "Tea" drinsk = drinks + ", " + "Lemonade" alert drinks
The goal was to warn "Coffee, tea, lemonade", but instead it turns out "Coffee, tea." The generated JavaScript is still valid and passes JSLint; he declares variables before use, which is good, but his variables are incorrect.
var drinks, drinsk; drinks = "Coffee"; drinks = drinks + ", " + "Tea"; drinsk = drinks + ", " + "Lemonade"; alert(drinks);
If the same example was written in plain JavaScript, JSLint would catch an error:
var drinks; drinks = "Coffee"; drinks = drinks + ", " + "Tea"; drinsk = drinks + ", " + "Lemonade"; alert(drinks); ------------------ Problem at line 4 character 1: 'drinsk' was used before it was defined. drinsk = drinks + ", " + "Lemonade";
To the question: Is there a way to save the errors that I create so that they can be found? I would love to see tools like JSLint still work.
Also tried http://www.coffeelint.org/ and he tells me: "Your code is free!"
source share