text: Check if current element is smaller than secondSmallest simply update the latter
code: else if ( arr [ i ] < secondSmallest ) { secondSmallest = arr [ i ] ; } } if ( 2 * smallest <= secondSmallest ) document . write ( " " ) ; else document . write ( " " ) ; }