My way makes more sense to me than the ones in the Hints section, but I’d sure like some critique:
function convertHTML(str) {
const arr = [["&","&"],['>','>'],['<','<'],["'",'''],['"','"']];
for (let i=0; i < arr.length; i++) {
str = str.replace(new RegExp(arr[i][0],"g"),arr[i][1]);
}
return str;
}
Edited to fix the bad copy/paste that made it fail the tests.