0

What is the use of console in JavaScript playground and for what purpose they are used in real life?

Console in JavaScript playground

30th Jan 2020, 1:13 AM
Yogeshwaran
3 odpowiedzi
+ 2
You can find any warnings and errors on the console, in your JS code. Also, if you want to view some JS stuffs like Objects, HTMLCollections, API response in detail, you can only use console.log(obj_name); you cannot view details of them using document.write(obj_name) or alert(obj_name).
30th Jan 2020, 1:56 AM
Dinesh Bala
Dinesh Bala - avatar
+ 1
Used to output error warnings or output of an obj created. Happy coding 😉 Keep coding 🙏🏾
30th Jan 2020, 4:06 AM
Alfred Juma
Alfred Juma - avatar
+ 1
console is very useful tool. This available to browsers. I am not sure for other browsers. But I am sure about Chrome. Because I uses it daily. console is also used to debug your code. Examples if you write a program that calculates two numbers but it is not working. How you will find what is the error in your code? Check out your console by pressing F12 button on your keyboard. You will get an error messages if your javascript code is wrong
30th Jan 2020, 4:10 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar