Js2coffee: convert JavaScript to CoffeeScript
js2coffee.org
js2coffee.org
Some code does not round-trip. This JS terminates but if I convert the resulting CS back to JS, I get an infinite loop.
function test() {
var i;
var countdown = function(n) {
var i;
for (var i = n; i > 0; i--) {
console.log(i);
}
}
for (var i = 0; i < 10; i++) {
countdown(i);
}
}
test(); EXPR if COND
EXPR unless COND
type of code, because the order of execution isn't very clear.