+ 2
What is difference between document.write and console.log?
4 Answers
+ 8
Console log sends a answer to the console, try open google chrome and press f11 "i guess" chrome will show u the console. When u put your information at the console.log it will show right there. On the other hand when u put any info at the doc.write it will show u when your doc gets executed
+ 2
if you want print any content in DOM use document.write,
console.log also print the values while debugging the script in developer tool
0
"console.log" will put your information in the console. You can access the log if you click "inspect" when you double click on mac (not sure if its right or left click on windows desktops lol) thats really only for developer eyes (back end) not the general user. But if you use "document.write" it will just add html to the page making it visible on the webpage (front end)
0
with document.write your answer can you see in the browser, and with console.log your answer you can see only in the console :)