What is Array prototype?
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.
Syntax
Array.prototype.name = value
Code
Take a look at the code below:
Free Resources
Copyright ©2026 Educative, Inc. All rights reserved