Trying to figure out why the spread operator is needed in the code below in order for it to produce a return. When I delete the ...
, no return is produced.
function binaryAgent(str) {
return String.fromCharCode(
...str.split(" ").map(function(char) {
return parseInt(char, 2);
})
);
}