+ 17
Explain please!....What is difference between document write and writeln ??
Are the same function write and writeln ....??
12 Respostas
+ 9
write and writeln are the same function. The only difference is that writeln adds a new line at the end of the text
+ 15
Sukkiđ thank you for information..
+ 14
Anhjje thank you you very helpful for me
+ 14
Morris Kollie why you send hear your code ....
+ 13
Sarthak Kimtani write and writeln are similar, why is the use of these two different?
+ 12
Sarthak Kimtani I am Understood this. Thank you very much for helping me
+ 7
I am not perfect but what i understood is document.write() puts the contents directly to the browser where the user can see it.
document.innerHTML is changing the HTML of the object you apply it to.
Essentially, you could use document.write() without any connected HTML, but if you already have HTML that you want to change, then document.innerHTML would be the obvious choice.
+ 4
The second one is a write with implicit "\n" ....
+ 4
Write("a");
Write("b");
Console output:
ab
It writes in the same line.
writeln = writeLINE which adds another line at the end.
writeln("a");
writeln("b");
Console output:
a
b
+ 3
Because it adds a new line at the end of the text
- 1
Mhysm vudx