JavaScript Array prototype Constructor

Array instances inherit from Array.prototype. As with all constructors, you can change the constructor's prototype object to make changes to all Array instances.

The prototype constructor allows you to add new properties and methods to the Array() object.

When constructing a property, ALL arrays will be given the property, and its value, as default.

When constructing a method, ALL arrays will have this method available.

Syntax = value


var fruits = ["Banana", "Orange", "Apple", "Mango"];

Example -