Driver code
let a = [ 2 , 3 , 5 , 4 , 5 , 3 , 4 ] ; let n = 7 ; document . write ( singleNumber ( a , n ) + " " ) ; let b = [ 15 , 18 , 16 , 18 , 16 , 15 , 89 ] ; document . write ( singleNumber ( b , n ) ) ;