Syntax error What are the methods of an array object in JavaScript?

What are the methods of an array object in JavaScript?



The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type.

Here is a list of some of the methods of the Array object:

S.No
Method & Description
       1
concat()

Returns a new array comprised of this array joined with other array(s) and/or value(s).
        2
every()

Returns true if every element in this array satisfies the provided testing function.
        3
filter()

Creates a new array with all of the elements of this array for which the provided filtering function returns true.
        4
forEach()

Calls a function for each element in the array.
         5
indexOf()

Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
         6
join()

Joins all elements of an array into a string.
Updated on: 2020-06-18T06:46:54+05:30

265 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements