Foundations
Loop Through an Array
Loop Through an Array
Arrays are often processed one item at a time. A loop can read each value and update a result variable.
Your task: Add every value in quizScores into scoreTotal. Log the total after the loop.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
Loop Through an Array
Arrays are often processed one item at a time. A loop can read each value and update a result variable.
Your task: Add every value in quizScores into scoreTotal. Log the total after the loop.