+ 1
How do I get the newline character(\n) to work properly in the code playground section?
you can check the output of the mini code at the link below to understand better. https://code.sololearn.com/W7hnzNZlV1K7/?ref=app
3 odpowiedzi
+ 2
for(i=1; i<11; i++){
document.write("<br> line ", i);
}
+ 8
Haha, you cannot. Since code playground behaves like a webpage, only <br> works. To make \n works, you would have to code in a console.
+ 1
Oh.. I was thinking with a C approach... thanks Calvin