Pergunta de entrevista da empresa HCL

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