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,
Specifically to what the OP has asked, if you want to initialize N variables with the same value (e.g. 0), you can use array destructuring and Array.fill to assign to the variables an array of N 0s:
0
let [a, b, c, d] = Array(4).fill(0); console.log(a, b, c, d);