Example
"Hello test" + "\r welcome world"
Current output :
Hello testwelcome world
expected output :
Hello test
welcome world
The easiest way to break lines in JS is, using <br> tag. That's the line breaking tag in HTML.
Example
"Hello test <br> welcome world"
Here is the answer.
document.write("Hello test <br> welcome world")
All the best.
Okay! Add %0D%0A to the place you want to encode a line break on the URL.
%0D - carriage return character%0A - line break characterExample :
"Hello test%0D%0Awelcome world"