0
Can i asking something . what difference code * document.write(""); than console.log(""); . ??? Please answer
Please answer
3 Answers
+ 5
It's in the name(s). One writes to a document, the other outputs to the console.
0
document.write will write your JS output and exclude all the HTML elements from the DOM tree. So all you'll see is your document.write output while console.log writes the output separately on a console window.
0
document.write replace all document text with the new one.
Cobsole.log write things in new console.