0

What is difference in console.log and document.writevin javascript

What is difference in console.log and document.writevin javascript

11th Jul 2020, 1:41 PM
AJMAL M
AJMAL M - avatar
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
11th Jul 2020, 1:53 PM
Nilesh
Nilesh - avatar
+ 1
console.log logs a message to the console( browser console in most cases). document.write overwrites the content of the <html> document.
11th Jul 2020, 1:45 PM
Ore
Ore - avatar
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
11th Jul 2020, 2:13 PM
joseffie
joseffie - avatar
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
11th Jul 2020, 2:25 PM
Ayush Kumar
Ayush Kumar - avatar