JavaScript: Array Object
Array
is the value of the property key "Array"
of the Global Object
.
console.log( window.Array === Array );
Type
Type of Array
is a function.
console.log( typeof Array === "function" );
Parent
Parent of Array
is Function.prototype.
console.log( Reflect.getPrototypeOf ( Array ) === Function.prototype );
Purpose
Purpose of Array
is:
- To create array objects.
- Used as a namespace to hold general purpose methods for working with array objects.
- Holds the property key
"prototype"
. The value ofArray.prototype
is the parent object of all array objects.