Question d’entretien chez HCL

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