Now print the largest twin in range
for ( let i = high ; i >= low ; i -- ) { if ( prime [ i ] && ( i - 2 >= low && prime [ i - 2 ] == true ) ) { document . write ( " " + ( i - 2 ) + " " + ( i ) + " " + " " ) ; twin = true ; break ; } } if ( twin == false ) document . write ( " " ) ; }