JavaScript Tutorial JavaScript References

JavaScript - Array Object



The JavaScript Array class is a global object which is used to construct arrays. Arrays are list-like objects whose prototype has methods to perform traversal and mutation operations. The length of the JavaScript array and types of elements in it are not fixed. Therefore, the length of an array can change at any time, and data can be stored at non-contiguous locations in the array.

Instance Methods

MethodsDescription
indexOf() Returns the position of the first found occurrence of specified element in the array.