What's the equivalent CoffeeScript syntax of the native JS' multiple variables for-loop?
for(var a = 0, b = 0; a < 100; a++, b += 10)
{
console.log(a, b);
}
Instead of a for construct like JavaScript's, CoffeeScript relies on comprehensions and ranges. From the documentation:
The only low-level loop that CoffeeScript provides is the
whileloop.
You could do something involving a range for a, with b being updated manually:
b = 0
for a in [0..99]
console.log a b
b += 10
Or use that while:
a = 0
b = 0
while a < 100
console.log a b
++a
b += 10