let x = (5, 6, 7, 8);
console.log(x);
let y = 5, 6, 7, 8;
console.log(y);
In the example above, x
will be assigned a value of 8
, while the second line will result in an error. What is the reason behind the success of the first assignment? How does it qualify as valid JavaScript syntax?