showing results for - "binary agents freecodecamp"
Anand
14 Jul 2018
1const binaryAgent = str => {
2  let string = ''
3  str.split(' ').forEach(elem => {
4    // Converts binary numbers to base 2
5    const toBase = Number.parseInt(elem, 2)
6    // Then convert the ASCII code which is now (toBase) to unicode 
7    string += String.fromCharCode(toBase)
8  });
9  
10  return string
11}
12
13binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");
queries leading to this page
binary agentsbinary agents freecodecamp