JS: Array (class)
What is the Keyword βArrayβ
Array is the value of the property key "Array" of the Global Object
.
console.log(globalThis["Array"] === Array);
Type
Type of Array is a function.
typeof Array === "function"
Parent
Parent of Array is Function.prototype.
Reflect.getPrototypeOf ( Array ) === Function.prototype
Purpose
Purpose of Array is:
- To create array.
- Used as a namespace to hold static methods.
- Holds the property key
"prototype". Its value is the parent of all instance of array.