4 ms·
Why is this considered so ugly? Is this not the same operation as var x=1, y=2, z=3; which is very, very common for variable initialization?
by JoelMcCracken 15y ago
Why is this considered so ugly? Is this not the same operation as var x=1, y=2, z=3; which is very, very common for variable initialization?
- xentronium 15y agoNope. It's the same operation as in: for (a = 0, b = 1; ... ; ...)
- olavk 15y agoNo, the comma in the var statement is not an operator, just a delimiter. But if you did: var a = (1, b = 2, c = 3); You would be using the comma operator. But that would be stupid.