0

I get a little confusion between console.log and document.write

I know that they are all used for printing out something,but is there any difference When and where to use console.log and document.write as well

19th Feb 2017, 5:49 AM
ThĂ nh Long
ThĂ nh Long - avatar
2 RĂ©ponses
+ 8
document.write will be displayed directly on the html page and mostly is not used for actually writing on the page console.log will display on inspector tab (click F12 on most web browsers) of the browser (on the sololearn playground it will be shown in the bottom of the screen) and it is mainly useful for debugging (displayinh messages and what not)
19th Feb 2017, 6:33 AM
Burey
Burey - avatar
+ 1
Oh i finally take it , thanks you so much :*
19th Feb 2017, 7:30 AM
ThĂ nh Long
ThĂ nh Long - avatar