What is the result of the following code?
let result = 0;
for (let i = 1; i <= 3; i++) {
if (i % 2 === 0) {
result += i;
}
}
console.log(result);
What is the result of the following code?
let result = 0;
for (let i = 1; i <= 3; i++) {
if (i % 2 === 0) {
result += i;
}
}
console.log(result);