+ 1

What is the difference between console.log and document.write in Javascript

12th Dec 2019, 5:46 AM
Aryan Marwah
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.
12th Dec 2019, 5:59 AM
Ipang
+ 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.
12th Dec 2019, 6:08 AM
Ipang
+ 2
Test it on your code playground
12th Dec 2019, 7:17 AM
Calviղ
Calviղ - avatar
+ 2
Error console occurs when there is error in your codesAryan Marwah
13th Dec 2019, 9:24 AM
Lady Kadashia = [T. I. K]
Lady Kadashia = [T. I. K] - avatar
+ 1
I am still not able to get. What is error console?
12th Dec 2019, 6:01 AM
Aryan Marwah