0
What is difference in console.log and document.writevin javascript
What is difference in console.log and document.writevin javascript
4 Answers
+ 2
https://code.sololearn.com/WSgW9701hmXI/?ref=app
Console log - output in the console
Document write - output in the document
Look at the code for more results
+ 1
console.log logs a message to the console( browser console in most cases).
document.write overwrites the content of the <html> document.
0
The difference between console. log and document.write is that console.log outputs a value to the console, while document.write outputs a value to the document itself.
https://code.sololearn.com/Wt307L5RjUvG/?ref=app
0
Hamm console is very useful tool If you want to see any value of anj var which is between code then you may directly print it in console which would not disturb your original web page