Why does Array.prototype return an empty array?

后端 未结 2 544
你的背包
你的背包 2021-01-14 00:53

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.

2条回答
  •  无人及你
    2021-01-14 01:22

    "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

提交回复
热议问题