Essentially console.log()
allows you to output variables in your javascript debugger of choice instead of flashing an alert()
every time you want to inspect something... additionally, for more complex objects it will give you a tree view to inspect the object further instead of having to convert elements to strings like an alert()
.