• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
- 1

Hi guys, what's the difference between document.write and console.log

javascript
6th Feb 2022, 2:00 AM
Shihan Mohamed
3 Answers
+ 2
document.write writes directly to the page, overwriting all existing HTML. Console.log writes to the console, does not display or affect the page Use the search bar next time, Here are some similar discussions: https://www.sololearn.com/discuss/1316935/?ref=app https://www.sololearn.com/discuss/41600/?ref=app https://www.sololearn.com/discuss/1144308/?ref=app https://www.sololearn.com/discuss/519585/?ref=app https://www.sololearn.com/discuss/271843/?ref=app https://www.sololearn.com/discuss/2615520/?ref=app https://www.sololearn.com/discuss/2887847/?ref=app https://www.sololearn.com/discuss/1914381/?ref=app https://www.sololearn.com/discuss/1024412/?ref=app https://www.sololearn.com/discuss/25652/?ref=app https://www.sololearn.com/discuss/262481/?ref=app https://www.sololearn.com/discuss/843065/?ref=app https://www.sololearn.com/discuss/1392847/?ref=app https://www.sololearn.com/discuss/2740946/?ref=app https://www.sololearn.com/discuss/2097089/?ref=app https://www.sololearn.com/discuss/2976926/?ref=app
6th Feb 2022, 2:05 AM
CGM
CGM - avatar
+ 2
https://code.sololearn.com/WTDyD07EuE3i/?ref=app
6th Feb 2022, 3:43 AM
Gordon
Gordon - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Functions in python
2 Votes
How to make a playground
1 Votes
For Mobile app
0 Votes
How can you find whether a number is odd or even in a different way(other than (x%2==0))?
1 Votes
I need advice
1 Votes
Html 5 document question
1 Votes
this query always result to be incorrect from Sorting Data lesson
1 Votes
Paint costs
1 Votes
Learning Python - Question
1 Votes
𝙵𝙸𝙽𝙳 𝚃𝙷𝙴 𝙸𝙽𝙿𝚄𝚃 𝙾𝙵 𝚃𝙷𝙴 𝙿𝚁𝙾𝙶𝚁𝙰𝙼
1 Votes