1function binaryAgent(str) {
2
3var newBin = str.split(" ");
4var binCode = [];
5
6for (i = 0; i < newBin.length; i++) {
7 binCode.push(String.fromCharCode(parseInt(newBin[i], 2)));
8 }
9return binCode.join("");
10}
11binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100');
12//translates to "Aren't"
13