查出第二大的数是多少

 1 
  arr=[4,3,5,9,1,12,89,2,44] 3 for(t of arr){ 4 5 6 if(t> max) 7 max=t; 8 else { 9 if(t>sec) 10 sec=t; 11 } 12 console.log(max,sec,t) 13 }

这个代码查出 第二大的数是多少

气功波(18037675651)
原文地址:https://www.cnblogs.com/qgbo/p/11171567.html