What would be the output of the following code? (Based on Spread Operator)
@Devtools Tech
function sum(x, y, z) {
return x + y + z;
}
const numbers = [1, 2, 3];
console.log(sum(...numbers));
Option 1
undefined
Option 2
NaN
Option 3
6
Option 4
'123'