You are viewing a single comment's thread. Return to all comments →
let bestCount = []; let lowestCount = []; let bestScore = scores[0]; let lowestScore = scores[0] for (let i = 0; i < scores.length; i++) { if (scores[i] > bestScore) { bestCount.push(scores[i]) bestScore = scores[i] } else if (scores[i] < lowestScore) { lowestScore = scores[i] lowestCount.push(scores[i]) } } console.log(bestCount, lowestCount) return [bestCount.length, lowestCount.length]
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 →