What is the value of sum after executing the following code?
const vector = {
x: 2,
y: 3,
z: 4
};
let sum = 0;
for (let coord in vector) {
sum += vector[coord];
}
What is the value of sum after executing the following code?
const vector = {
x: 2,
y: 3,
z: 4
};
let sum = 0;
for (let coord in vector) {
sum += vector[coord];
}