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:

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved