57.2 Score 70 plus! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

57.2 Score 70 plus!

Hi there, Even though I got the correct solution I would like to know what the correct "for loop" would look like. thanks let scores = [68,95,54,84,77,75,63,74,69,80,71,63] //your code goes here // Count how many 2 there are in arr var count = scores.filter(x => x > 70).length; console.log(count);

12th Feb 2022, 10:07 AM
Bball4Life
1 Answer
+ 1
count=0 for( let x of scores) if( x>70) count++; count=0 for( let x=0; x<scores.length; x++) if(scores[x]>70) count++;
12th Feb 2022, 11:06 AM
Jayakrishna 🇮🇳