In ECMAScript,there is not __proto__
of an object:
Array.hasOwnProperty('prototype') //true
var arr = new Array()
arr.hasOwnProperty('__proto__') //false
then, we can find:
Object.getOwnPropertyDescriptors(arr)
Output:
length:{value: 1, writable: true, enumerable: false, configurable: false}
__proto__:Object
So, I am confused:
Does arr
has his own property __proto__
?
When I try to do follow things:
arr.unshift("2")
Where does Js engine find unshift
method?
Is there any information let Js engine find unshift
?