Browsers give us a console
object that gives us methods through which, as our script executes, we can send information to the dev tools console for closer examination. This is great. Setting breakpoints in the browser is swell, too, but a quick console dump can be just fantastic, for my purposes.
There’s a lot else the console
object can do but mostly I use log()
to send basic text and variables and dir()
to send objects. (Which, fun fact: I just discovered that, at least in Firefox, the only difference between dir
and log
when outputting a document element is that dir
expands the result while the log
version appears collapsed.)