Created
April 30, 2015 23:55
-
-
Save JavaScript-Packer/56e2f68838b307b1096d to your computer and use it in GitHub Desktop.
Convert a string of text to Base2 binary (with spacing as delimiter)
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
var Δ='JavaScript Packer'; | |
function str2bin(Δ, w, o) { | |
w = []; | |
for (o in Δ) { | |
w.push(Δ.charCodeAt(o).toString(2)); | |
} | |
return w.join(" "); | |
} | |
alert(str2bin(Δ)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment