New properties and methods can be added to an Array()
object using the property constructor. Whenever a property is constructed, arrays are given the property and its value as default. When a method is constructed, all arrays will have access to this method.
Array.prototype.name = value
Take a look at the code below: