What is the relation between Console and Javascript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the relation between Console and Javascript?

Hi, What is the relation between Console and Javascript? And which is better to print output? (console.log or document.write) Please give answer with explanation 🙏 Thank you.

17th Aug 2021, 10:51 AM
Fꫀⲅძ᥆͟ᥙ᥉᯽
Fꫀⲅძ᥆͟ᥙ᥉᯽ - avatar
2 Answers
+ 3
You do not carefully read the provided material. Review Lesson 2.1. It has the answers to your question. While document.write() is used to write the result in HTML, the console.log() function is used to print the result to the browser console. The console is the part of the web browser that allows you to log messages, run JavaScript, and view errors and warnings.
17th Aug 2021, 11:23 AM
Solo
Solo - avatar