+ 4
Is there a difference between document.write() and console.log()?
2 Answers
+ 12
The former writes to the HTML page, while the latter writes to the JS console. We would usually use the latter when it comes to debugging purposes.
0
If you want to print something on Web page then you will use document.write()..and
If you want to print some in browser console then you will use console.log()..