Created
March 14, 2016 04:46
-
-
Save srkama/5666eb46aa47cacd029b to your computer and use it in GitHub Desktop.
binary to string.
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
function binaryAgent(str) { | |
actualStr="" | |
str.split(" ").map(function(val) { | |
actualStr += String.fromCharCode(parseInt(val,2)); | |
}) | |
return actualStr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment