Score 70+ (ES6)
Instructions are to use the âfor...of...â loop but I am so confused by that that I was trying to solve another way and I still canât seem to get it right. Any help on what is wrong with my code below would be helpful! CHALLENGE: // Students need to score at least 70 points to pass an exam. The given program declares an array with results. Write a program to count and output to the console the number of students who pass the exam. let scores = [68,95,54,84,77,75,63,74,69,80,71,63] //your code goes here /* // I started with this and then switched to what Iâm more familiar with. for (let a of scores){ return(a); */ for (let x = 0; x >= scores.length) { if (scores[x] < 70) { continue; } if (scores[x] >= 70) { return scores[x]; } x += 1; } } console.log(x);