Following Felix Klings advice I tried it out in my chrome browser.
console.dir([1,2])
gives the following output:
Array[2]
0: 1
1: 2
length: 2
__proto__: Array[0]
While console.log([1,2])
gives the following output:
[1, 2]
So I believe console.dir()
should be used to get more information like prototype etc in arrays and objects.