You are viewing a single comment's thread. Return to all comments →
function breakingRecords(scores) { let min=scores[0],max=scores[0],maxcount=0,mincount=0,i; for(i=0; i<scores.length; i++){ if(scores[i]>max){ maxcount++; max=scores[i]; } if(scores[i]<min){ mincount++; min=scores[i] } } return [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 →