MTAP Technologies interview question

Javascript to find the second largest number from the array. Flatening in Javascript.