JS
challenger
Home
JavaScript Basics
loops
Sum Even Numbers with a For Loop
Sum Even Numbers with a For Loop
Use a for loop to calculate the sum of all even numbers in the array numbers. Store the result in the variable sum.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console