Reputation: 86055
With the following line of code:
document.writeln("blahblahblah")
I expect the content to be placed on its own line, but instead the content is inserted, but with no new line. Only a space.
Is it expected?
Upvotes: 4
Views: 1232
Reputation: 1431
The new line will be displayed only inside code output tags (pre, code etc.). In other cases browser will convert it into space.
Upvotes: 4