If found , print the pair .
if ( arr . includes ( - arr [ i ] ) ) { document . write ( arr [ i ] + " " + - arr [ i ] + " " ) ; pair_exists = true ; } } else break ; } if ( pair_exists == false ) document . write ( " " ) ; }