To create a line break in Javascript, you can use the escape character \n
. This will insert a newline character and move the text to the next line.
Example:
index.tsx29 chars2 lines
Output:
index.tsx12 chars3 lines
You can also use the <br>
tag in combination with Javascript to add a line break in HTML.
Example:
index.tsx64 chars2 lines
Output:
index.tsx12 chars3 lines
gistlibby LogSnag