Why does Array.prototype return an empty array?

This might be a dumb question, but why am I getting an empty array when I console Array.prototype ?

I expected push and pop methods.

+4
source share
2 answers

Most prototype built-in methods are not listed, so they will not be displayed if you use for..in (which you should not use in arrays, but this is just an example). Since they are not listed, they will not appear if you "console them."

+5
source

"Note: Array.prototype does not apply to a single array, but to the array itself (). - http://www.w3schools.com/jsref/jsref_prototype_array.asp

+1
source

All Articles