I have just put together my first pass and don’t know why my console.log() is not generating anything for me to start debugging. I don’t want commentary on the code, just an explanation why my console.log() is generating nothing.
**Your code so far**
function convertHTML(str) {
convertHTML("Dolce & Gabbana");
const arr = [];
for (let i = 0; i < str.length; i++) {
HTMLcoder(str[i],arr);
}
let HTMLcoder = function(char, HTMLcode) {
switch (char) {
case "&":
HTMLcode.push("&");
break;
case "<":
HTMLcode.push("<");
break;
case ">":
HTMLcode.push(">");
break;
case "'":
HTMLcode.push("'");
break;
case '"':
HTMLcode.push(""");
break;
default:
HTMLcode.push(char);
}
console.log(HTMLcode, arr, str);
console.log(arguments);
}
return coded=arr.join("");
console.log(coded);
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Challenge: Intermediate Algorithm Scripting - Convert HTML Entities
Link to the challenge: