Skip to content
Advertisement

Add more new lines to end of line in stdout

I want to be able to print out my logs with extra new lines.

This is what the logs look like

JavaScript

They look much cluttered in the terminal and although there is a newline, I want to add 1 more newline to make it more readable.

I tried using

JavaScript

and

JavaScript

to no avail.

Advertisement

Answer

JavaScript

Not entirely certain about portability, but the open group specs (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pr.html#tag_20_93_01) state:

JavaScript

and

JavaScript

so it’s pretty standard.

Advertisement