Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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
PLUS
Bob McCarty
Courses Plus Student 16,618 Points

Thomas,

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

Justin Olson
Justin Olson
13,792 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!?