Ad
Fundamentals
Arrays
Data Types
Code
Diff
  • const thirdGreatest = a => [...a].sort((a,b) => b - a)[2];
    • var thirdGreatest = a => JSON.parse(JSON.stringify(a)).sort((a,b) => b - a)[2];
    • const thirdGreatest = a => [...a].sort((a,b) => b - a)[2];