We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
functionbreakingRecords(scores){// Write your code hereletmax=0,min=0;letlowest=scores[0],highest=scores[0];for(leti=0;i<scores.length;i++){if(scores[i]>highest){highest=scores[i];max++;}if(scores[i]<lowest){lowest=scores[i];min++;}}return[max,min];}
Cookie support is required to access HackerRank
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 →
My js solution