You are viewing a single comment's thread. Return to all comments →
it's min (in js)
function breakingRecords(score) { const scoreLength = score.length; let mostScore = score[0]; let worstScore = score[0]; let mostScoreIncreased = 0; let worstScoreDecreased = 0; for(let i = 0; i < scoreLength; i++){ const curScore = score[i]; if(mostScore < curScore){ mostScore = curScore; mostScoreIncreased++; } if(worstScore > curScore){ worstScore = curScore; worstScoreDecreased++; } } return [mostScoreIncreased, worstScoreDecreased]; }
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 →
it's min (in js)