Tell us what’s happening:
I can’t get three checks though Chrome console shows right answers
Your code so far
function convertHTML(str) {
// :)
str = str.replace(/^['"]/g|/['"]&/g, "");
str = str.replace(/&/g, "&");
str = str.replace(/</g,"<");
str = str.replace(/>/g, ">");
str = str.replace(/["]+/g, """);
str = str.replace(/[']+/g, "'");
return str;
}
convertHTML('Stuff in "quotation marks"');
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/convert-html-entities