Cross-browser console.log() Wrapper

Open your console, then click one of the log buttons below.

These examples will write the major JavaScript variable types to the console (string, object, function, etc). Depending on your console, each type will appear either as a plain strings (IE, mostly) or as interactive, explorable items (Firebug, some others). Note that any limitations are likely imposed by the console itself, not the log() function being demoed here.

You can see the log() function in consolelog.js. For a detailed explanation, see the blog post. You can also fork the project on GitHub.

If you're lost, note that this has nothing to do with the mathematical log function. And if you're looking to comfort a grieving cylinder of wood, I really can't help you, sorry!

Command Arguments
"Here's a string", 3.14, { "alpha": 5, "bravo": false }, document.getElementById("charlie"), new Date()
function() { alert("hello"); }, (2 + 2 === 5), [1, "2", 3, 4, "5"]

If your browser has a console, use the console.log buttons for comparison to see how the call would normally be handled.