+ 1

I found console.log() being used to get result instead of document.write() in other tutorials. Whta is difference between these?

15th Feb 2017, 8:48 AM
Sandesh Tamang
Sandesh Tamang - avatar
3 Antworten
+ 2
document.write() writes to the page/document while console.log() writes to the console.
15th Feb 2017, 8:55 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
console in the sense u can inspect the HTML by right clicking on the page and select the inspect element and then go to console tab....before publishing the content on live they use console outputs.so that they can understand how the code is working
15th Feb 2017, 3:47 PM
Manikanth Vanka
Manikanth Vanka - avatar
0
thanks
15th Feb 2017, 7:06 PM
Sandesh Tamang
Sandesh Tamang - avatar