You are viewing a single comment's thread. Return to all comments →
Mine (in JS) was very similar:
function getRecord(games) { let most = games[0]; let least = games[0]; let dMost = 0; let dLeast = 0; for (const score of games) { if (most < score) { most = score; dMost++; } else if (score < least) { least = score; dLeast++; } } return [dMost, dLeast]; }
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 →
Mine (in JS) was very similar: