0

Why should i use Console.log?

28th Jun 2021, 10:13 AM
Arpon Sarker
Arpon Sarker - avatar
5 Answers
+ 3
console.log() is used to log something to the console. You can use console.log() for debugging purposes.
28th Jun 2021, 10:21 AM
Prajyot
Prajyot - avatar
+ 2
Because logging something into JS console is less annoying than popping it up in an alert() box or by rewriting document content using document.write()
28th Jun 2021, 10:20 AM
Ipang
+ 1
Is it important to use?how much?
28th Jun 2021, 10:29 AM
Arpon Sarker
Arpon Sarker - avatar
+ 1
not much important: mostly used to debug your javascript code ^^
28th Jun 2021, 10:36 AM
visph
visph - avatar
+ 1
when you want to debug your code. In intial days, you don't know about breakpoints and conditional breakpoints. It helps in debuging code. If you don't want to use `console.log()`. don't use it. But, it is good to know. const sum = (a, b) => a + b; console.log(add(4, 7)); console.log(add(2, 7));
28th Jun 2021, 1:49 PM
šŸ‡®šŸ‡³VivekšŸ‡®šŸ‡³
šŸ‡®šŸ‡³VivekšŸ‡®šŸ‡³ - avatar