Tell us what’s happening:
I had a lot of trouble in figuring out what was wrong with this solution (but I solved it)… so I have a simple question: there is a way to have printed somewhere the raw html of a string?
Your code so far
function convertHTML(str) {
// :)
return str.replace("&","&").replace("<", "<").replace(">", ">").replace('"', '"').replace("'", "'");
}
convertHTML("Dolce & Gabbana");
console.log(convertHTML("Sixty > twelve"));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36
.
Link to the challenge: