Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to convert string into binary in javascript

// Text to Binary
function text2Binary(string) {
    return string.split('').map(function (char) {
        return char.charCodeAt(0).toString(2);
    }).join(' ');
}
text2Binary("Hello World");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #string #binary #javascript
ADD COMMENT
Topic
Name
8+4 =