function binaryAgent(str) {
	let arr = str.split(' ');
	let result = [];
	for (let s = 0; s < arr.length; s++) {
		// parse element of array in binary (the 2), convert to string 
		// in decimal (the 10) and get the corresponding ASCII char from 
		// that number
		result.push(String.fromCharCode(parseInt(arr[s], 2).toString(10)));
	}

	return result.join('');
}
// The binary string will be space separated.
The binary string will be space separated.
The binary string will be space separated .
function binaryAgent(str) {
	let arr = str.split(' ');
	let result = [];
	for (let s = 0; s < arr.length; s++) {
		result.push(String.fromCharCode(parseInt(arr[s], 2).toString(10)));
	}
	return result.join('');
}
function binaryAgent ( str ) { let arr = str . split ( ' ' ) ; let result = [ ] ; for ( let s = 0 ; s < arr . length ; s ++ ) { result . push ( String . fromCharCode ( parseInt ( arr [ s ] , 2 ) . toString ( 10 ) ) ) ; } return result . join ( '' ) ; }
The binary string will be space separated.
The binary string will be space separated .
// parse element of array in binary (the 2), convert to string  // in decimal (the 10) and get the corresponding ASCII char from  // that number