0
Confused
Why many functions are there console.log() Or document.write() ...etc which is appropriate ?
3 Respuestas
+ 13
In my knowledge
Console. log() is used to debugging By developers tools..
And document.write() method is just for testing purposes...
Use document.getElementById("Id name");
+ 4
None of them is really "appropriate", they have different functions, console.log will output in the console, so the document isn't messed up, you can see document.write even when you don't have access to the console
+ 2
Console.log() - press F12 in your browser you can see the console used for debugging
Document.write() - used to test the website