I've read around that document.write()
is a bad idea to incorporate into my webpage. However, W3Schools, and the MDN both use this function in tutorials.
What is wrong with document.write()
, and what are some alternatives to using it?
NOTE: I've read similar questions here on SO, but I'd like a detailed answer that draws from official sources.