The code below runs without an error, but its result is wrong. Which statement correctly identifies the bug?
let total = 0;
const values = ["10", "20", "30"]; // e.g. read from input fields
for (const v of values) {
total += v;
}
console.log("Total:", total);
0 + "10" is "010"; from then on total is a string. Convert each value: total += Number(v) gives 60.