Pergunta de entrevista da empresa Retail Sols

second largest number in an array in javascript