It might be a stupid question, but why do I get an empty array when I console out Array.prototype
?
I was expecting the push and pop methods.
"Note: Array.prototype does not refer to a single array, but to the Array() object itself." - http://www.w3schools.com/jsref/jsref_prototype_array.asp
Most of the built-in methods of prototypes are not enumerble, so they won't show up if you use for..in
(which you shouldn't on arrays, but this is just an example). Since they not enumerable, they won't show up if you "console them out".