Reading documentation online, I\'m getting confused how to properly define multiple JavaScript variables on a single line.
If I want to condense the following code,
There is no way to do it in one line with assignment as value.
var a = b = 0;
makes b global. A correct way (without leaking variables) is the slightly longer:
var a = 0, b = a;
which is useful in the case:
var a = , b = a, c = a, d = a;