Implement an HTML Entity Converter - Implement an HTML Entity Converter

Tell us what’s happening:

I am having issues with properly printing out special characters as HTML entities. I can’t post my code because I believe it is very close to the solution.

The main issue I am having with JS is ensuring that “&” is printed out as “&amp” or “<“ is printed out as “&lt”. I am unsure how to ensure it is printed out as that second string literal to the console because in JS it just prints out “&” or “<“ no matter what I do.

I already have the logic down about parsing through the string and making the replacement, but as aforementioned it wont print out as “&amp” or “&lt”.

Challenge Information:

Implement an HTML Entity Converter - Implement an HTML Entity Converter

You will only see the HTML entities in your browser’s console, not the fCC editor.

1 Like

Ah, this helped a lot. Thank you!