JavaScript JavaScript Basics (Retired) Introducing JavaScript Review Adding Scripts and Simple JavaScript Commands

what is difference between document.write and document.writeln

?

3 Answers

Bob McCarty
PRO
Bob McCarty
Pro Student 16,614 Points

Thomas,

writeln adds a new line at the end of the text like a <br> tag. write does not.

Justin Olson
Justin Olson
11,639 Points

As Bob said. Here's a link that will provide more information and an example if that helps.

http://www.w3schools.com/jsref/met_doc_writeln.asp

nice it is not bad huh!?