Created
January 14, 2021 06:56
-
-
Save 0rbianta/49c1f7794023f7ff35ec059c63c739bf to your computer and use it in GitHub Desktop.
String2Bin with NodeJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = "Hello World"; | |
var bins = []; | |
for(var i=0;i<data.length;i++){ | |
bins.push(data.charCodeAt(i).toString(2)); | |
} | |
console.log(bins); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment