Complete the code to print numbers from 0 to 4 using a for loop.
for (let i = 0; i [1] 5; i++) { console.log(i); }
Complete the code to sum numbers from 1 to 5 using a for loop.
let sum = 0; for (let num = 1; num [1] 5; num++) { sum += num; } console.log(sum);
Fix the error in the for loop to print each fruit in the array.
const fruits = ['apple', 'banana', 'cherry']; for (let i = 0; i [1] fruits.length; i++) { console.log(fruits[i]); }
Fill both blanks to create a for loop that counts down from 5 to 1.
for (let i = [1]; i [2] 0; i--) { console.log(i); }
Fill all three blanks to create a for loop that prints even numbers from 2 to 10.
for (let i = [1]; i [2] 10; i [3]) { console.log(i); }
