I have tried using console.log
so I can see the content of my array that contains multiple objects. However I get an error saying console.log
is not an
I warmly recommend this snippet to ensure, accidentally left code pieces don't fail on clients browsers:
/* neutralize absence of firebug */
if ((typeof console) !== 'object' || (typeof console.info) !== 'function') {
window.console = {};
window.console.info = window.console.log = window.console.warn = function(msg) {};
window.console.trace = window.console.error = window.console.assert = function(msg) {};
}
rather than defining an empty function, this snippet is also a good starting point for rolling your own console surrogate if needed, i.e. dumping those infos into a .debug Container, show alerts (could get plenty) or such...
If you do use firefox+firebug, console.dir()
is best for dumping array output, see here.