+ 1
What is the difference between console.log and document.write in Javascript
6 Réponses
+ 3
`console.log` writes into the Javascript error console. `document.write` writes into the current document, at the same time also overwriting whatever there is that had been rendered on the page by web browser.
+ 4
It is mainly used by browser to display error message that comes when a script is not successfully processed (something went wrong), this is to inform the developer that there's a problem while processing the script, so the developer can locate and fix the problem in the script.
+ 2
Test it on your code playground
+ 2
Error console occurs when there is error in your codesAryan Marwah
+ 1
I am still not able to get. What is error console?