Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

find the second largest number in array javascript

const input = ['20', '120', '111', '215', '54', '78'];
const secondSort = input.sort(function (a, b) { return b - a}[1])
console.log("===> :: secondSort", secondSort);
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #find #largest #number #array #javascript
ADD COMMENT
Topic
Name
5+3 =