<prompt> 11, 2, 31, 7, 15Kuandika kazi katika JavaScript kwamba inachukua safu ya idadi kama pembejeo na hupata namba ya pili ya juu katika safu.  <response>: Heres the solution code in JavaScript:javascriptfunction findSecondHighestarr remove duplicates from array let uniqueArray ...new Setarr; sort the array in descending order uniqueArray.sortfunctiona, b return b - a; ; return second element return uniqueArray1;console.logfindSecondHighest11, 2, 31, 7, 15; 