+ 1

What is console.log

What is console.log in java script and where in the lesson can i find it??

24th Aug 2018, 8:34 PM
David Agustinus
David Agustinus - avatar
4 Answers
+ 3
console.log is a native browser function, which you can use to print something to your browser console. It has actually nothing to do with Javascript itself, but it's enough to know that a console can be used for testing your code and printing the result or for debugging. console is an object and "log" is an function of the object. You probably know what a function is.
24th Aug 2018, 8:51 PM
BraveHornet
BraveHornet - avatar
+ 3
you can find "console.log()" here; https://www.w3schools.com/js/js_output.asp
24th Aug 2018, 8:59 PM
Sousou
Sousou - avatar
+ 2
console.log(10) //in javascript == print(10) #in python console.log("Hello") prints Hello in the console
24th Aug 2018, 8:55 PM
Sousou
Sousou - avatar
0
It's a the same like print in python. Use it, for exemple to see where something goes wrong in your code!
24th Aug 2018, 8:53 PM
Théophile
Théophile - avatar