0

console.log()

I understood console.log() takes what we put into its brackets and prints it into ''console''. But why does all this would result useful? //sorry for my english dudes

30th Aug 2019, 7:07 AM
Adriano Ucciardello
7 Answers
+ 3
console.log() is most often used when testing yo6r program and providing a useful tool for finding bugs (if you don't want to use a debugger haha). An example of this would be testing the value of a variable throughout certain parts throughout your code, as doing so could give you a better idea of how your code is functioning and what you could do to improve on it based on that information
30th Aug 2019, 7:25 AM
Faisal
Faisal - avatar
+ 2
Its kinda like document.write(); except that it writes the output on the console (ctrl shift i,). Would u like an example ?
30th Aug 2019, 9:56 AM
Minerals2016
Minerals2016 - avatar
+ 2
Adriano Ucciardello Nope, only in the console will it be influenced (to my understanding). And yeah np 🙃🙃
30th Aug 2019, 10:25 AM
Minerals2016
Minerals2016 - avatar
+ 1
[Minerals2016]: I guess I got how its syntax works, thanks, but I have another question about console.log(). As the method must be written into the code, if I use it rather than ''debugger'', will the code be in any way influenced?
30th Aug 2019, 10:23 AM
Adriano Ucciardello
+ 1
Np 😉🙃
30th Aug 2019, 10:55 AM
Minerals2016
Minerals2016 - avatar
0
I wouldn't have got better answer, thank you
30th Aug 2019, 7:45 AM
Adriano Ucciardello
0
[Minerals2016]: Gotcha, thank you again 👍
30th Aug 2019, 10:53 AM
Adriano Ucciardello