I want JavaScript to translate text in a textarea into binary code.
For example, if a user types in "TEST
TEST
This might be the simplest you can get:
function text2Binary(string) { return string.split('').map(function (char) { return char.charCodeAt(0).toString(2); }).join(' '); }