In function type objects, the length property signifies the number of arguments expected by a function type object. For example, the length field in Function object, Array object , in the below visualisation, has the value 1.
In the above visualisation, length field is also a member of object type object Array.prototype, whose value is 0.
MDN says:
Array.prototype.lengthreflects the number of elements in an array.
Following this definition in below cars & bikes array,
var cars = new Array("Saab", "Volvo", "BMW");
var bikes = ["Honda", "Yamaha"];
cars.__proto__.length & bikes.__proto__.lengthis still 0.
Multiple array objects(cars, bikes) cannot share the same length property value as length property is sitting in Array.prototype.
1)
As per MDN, Is it a right definition?
2)
If no, What does length field in Array.prototype signify?
