When x is odd we continue the same process which we did in previous loop .
if ( rem [ x / 2 ] > 0 && rem [ x - x / 2 ] > 0 ) { document . write ( " " + " " ) ; } else { document . write ( " " + " " ) ; } } } }