How to create a new line in JavaScript?

Spread the love

Sometimes, we want to create a new line in JavaScript.

In this article, we’ll look at how to create a new line in JavaScript.

How to create a new line in JavaScript?

To create a new line in JavaScript, we use the write '\n' on the screen.

For instance, we write

document.write("\n");

to write a new line to screen with document.write.

Conclusion

To create a new line in JavaScript, we use the write '\n' on the screen.

Leave a Reply

Your email address will not be published.