Frage im Vorstellungsgespräch bei HCL

write a code to find the second max value in an array using Javascript.