Skip to content

Instantly share code, notes, and snippets.

@codebubb
Created December 8, 2015 20:34
Show Gist options
  • Select an option

  • Save codebubb/5252d11554fc28fec545 to your computer and use it in GitHub Desktop.

Select an option

Save codebubb/5252d11554fc28fec545 to your computer and use it in GitHub Desktop.
// Bonfire: Binary Agents
// Author: @codebubb
// Challenge: http://www.freecodecamp.com/challenges/bonfire-binary-agents
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function binaryAgent(str) {
return str.split(' ').map(function(e){
return String.fromCharCode(parseInt(e, 2));
}).reduce(function(a,b){
return a+b;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment