In JavaScript, is chained assignment okay?
Yes, they’re not the same. var a = b = [] is equivalent to var a; b = []; a = b; Not only do both a and b get assigned the same value (a reference to the same empty array), b is not declared at all. In strict mode in ECMAScript 5 and later, … Read more