Java script

What is the difference between document.write and document.writeln in Java script ?

1 Like

document.write() writes to the document without appending a newline at the end. document.writeln() writes to the document appending a newline at the end. That is the main difference between among them.

2 Likes