You are viewing a single comment's thread. Return to all comments →
if(scores.length === 0) return [0, 0] let min_score = scores[0] let max_score = scores[0] let min_break = 0 let max_break = 0 const scoresSkipFirstElem = scores.slice(1); for(let score of scoresSkipFirstElem) { if(score < min_score) { min_score = score; min_break +=1; } else if (score > max_score) { max_score = score; max_break +=1 } } return [max_break, min_break]
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 →