4 ms·
document.writeln is generally frowned upon in production code since there are better ways to manipulate a page using the DOM. I still see it used occasionally
by cruise02 13y ago
document.writeln is generally frowned upon in production code since there are better ways to manipulate a page using the DOM. I still see it used occasionally for debugging (although even that usage is disappearing, as most browsers have some form of debug console available) and in tutorials and books for beginners.
Here's a Stack Overflow post that outlines some of its pros and cons. http://stackoverflow.com/q/802854/1288 http://stackoverflow.com/q/802854/1288