Video of the Day
Assign your function's string parameter to your temporary DIV's "innerHTML" attribute.
Create a temporary string variable in your function.
Grab the plain text content of your temporary DIV using its "textContent" and "innerText" attributes and assign it to your temporary string variable. Because of cross-browser compatibility issues, both "textContent" and "innerText" will be defined in some web browsers and undefined in others, but one or the other will be defined in all versions of all major browsers.
Return the value held by your temporary string using a "return" statement. This will return the plain text value of your converted HTML.