DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
second largest number in array javascript
['20','120','111','215','54','78'].sort(function(a, b) { return b - a; })[1]; // '120'
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#largest
#number
#array
#javascript
ADD COMMENT
Topic
COMMENT
Name
2+2 =
Submit