Now prvar the smallest twin in range
for ( i = low ; i <= high ; i ++ ) { if ( prime [ i ] && prime [ i + 2 ] ) { var a = i + 2 ; document . write ( " " + " " + i + " " + a + " " ) ; twin = true ; break ; } } if ( twin == false ) { document . write ( " " ) ; } }