2 ms·
The thing you end with the semicolon is a expression. if (1) console.log(1), console.log(2), console.log(3); The comma breaks and returns the next value.
by igl 13y ago
The thing you end with the semicolon is a expression.
if (1) console.log(1), console.log(2), console.log(3);
The comma breaks and returns the next value.
var foo = 1, 2, 3;
foo => 3
So correctly: Use this shorthand syntax to pick up only the next expression. :)