Convert ASCII value to binary
let bin = " " ; while ( val > 0 ) { if ( val % 2 == 1 ) { bin += ' ' ; } else bin += ' ' ; val = Math . floor ( val / 2 ) ; } bin = reverse ( bin ) ; document . write ( bin + " " ) ; } }