Convert HTML Entities, Why am I wrong?

I looked at the “get a hint” section and I saw the solution was very similar to my own. I just need a new pair of eyes (and more experienced eyes) to tell me why mine doesn’t work at all.
Thanks in advance.

Your code so far


function convertHTML(str) {
  // :)
  var placeHolder=str.split("");
  for (var i = 0; i<placeHolder.length;i++){
switch(placeHolder[i]){
case '&': 
placeHolder[i] ='&amp;';
break;
case '<': 
placeHolder[i] ='&​lt;';
break;
case '>': 
placeHolder[i] ='&gt;';
break;
case "'": 
placeHolder[i] ='&​apos;s';
break;
case '"': 
placeHolder[i] ='&​quot;';
break;
str=placeHolder.join("");
  return str;
}}}

convertHTML("Dolce & Gabbana");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36 OPR/63.0.3368.53.

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

for example here there is an extra s at the end
if you have also copied the entities instead of typing them, there may be an invisible character so you will need to delete and retype them

On a mac, Textwrangler can remove invisible characters. Perhaps there is another editor on other platforms?

I wrote all this (from a video) not copy paste.
I see the extra S, but the rest of the test are not working either.

ah, I saw it… look at the return statement, and at the closing curly braces…

Thank you for your help