Binary Agents I give up

nothing is working .

Your code so far

function binaryAgent(str) {
  bitStr=str.split(' ');
  undo= {};
  for(i=0;i<bitStr.length;i++){
    undo.push(String.fromCharCode(parseInt(bitStr[i], 2)));
  }
  return undo.join('');
}

binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");       

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/binary-agents

syntax errors:

  • you have many uninitialised variables, remember to initialise your variables with let or const
  • undo is an object but you use push() and join() on it which are array methods

thanks so much i have been struggling for days cause it worked in Repl.it.

on repl.it I get

when you create a repl try creating those just for JavaScript, not the html/css/js ones