Convert HTML Entities [Berlin]

Tell us what’s happening:
what seems to be the problem with my code?

Your code so far


function convertHTML(str) {
  var temp = str.split('');
  for (let x = 0; x < temp.length; x++) {
    switch (temp[x]) {
      case '>':
      temp[x] = '&lt;';
      break;
      case '&':
      temp[x] = '&amp;';
      break;
      case '>':
      temp[x] = '&gt;';
      break;
      case '"':
      temp[x] = '&quot;';
      break;
      case "'":
      temp[x] = '&apos;';
      break;
    }
  }
  // &colon;&rpar;
    temp = temp.join('');
  return temp;
}

convertHTML("Dolce & Gabbana");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3223.0 Safari/537.36.

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

you are looking for > twice…one of those should be <

yeah… thanks, got it now