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
The console object is available in Internet Explorer 8 or newer, but only if you open the Developer Tools window by pressing F12 or via the menu.
It stays available even if you close the Developer Tools window again until you close your IE.
Chorme and Opera always have an available console, at least in the current versions. Firefox has a console when using Firebug, but it may also provide one without Firebug.
In any case it is a save approach to make the use of console output optional. Here are some examples on how to do that:
if (console) {
console.log('Hello World!');
}
if (console) console.debug('value of someVar: ' + someVar);