Ad
Fundamentals
Arrays
Data Types
Code
Diff
  • var thirdGreatest = (arr) => arr.sort((a,b) => b - a)[2];
    • var thirdGreatest = (arr) => arr.sort((a,b) => a - b)[arr.length - 3];
    • var thirdGreatest = (arr) => arr.sort((a,b) => b - a)[2];