on-internet
← Community

How do I get the second largest element from an array in javascript

Stack Overflow ·

I have an integer array like this : arr[20,120,111,215,54,78]; I need a function taking an array as its argument and returning the second largest element of that array.

Comments

Sign in or sign up to comment and upvote.

No comments yet.