You are viewing a single comment's thread. Return to all comments →
Here is my Javascript solution
const max = scores[0]; const min = scores[1];
let maxCount = 0; let minCount = 0; for(let i=2; i < scores.length; i++){ if(scores[i] > max){ maxCount += 1; }else if(scores[i] < min){ minCount += 1; } } console.log(maxCount, minCount);
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
Here is my Javascript solution
const max = scores[0]; const min = scores[1];