Some important concept of Array
1.IndexOf() method
It is used to find an array index number from the array element.
Example:
2.push() method
It is used to add element from behind the array
Example:
3.pop() method
It is used to delete element from behind the array
Example:
4.Slice() method
It is used to show a certain number of the array elements.
Example:
5.Splice() method
it is used to remove or replace an existing number in an array and also can add a new element into an array.
Example:
6.Shift() & unShift() methods
The unshift method is used to add an element from the front area of an array and return the new length of the array.
Example :
The shift method is used to remove an element from the first element of an array and also return that removed element.
Example:
7.map() method
The mapping method is used to repeat the array and the calling function in each of the elements of the array.
Example:
8.find() method
It is used to get the value of the first element in the array that satisfies the provided condition. It checks all the elements of the array and whichever the first element satisfies the condition is going to print.
Example:
9.filter() method
This method creates a new array with all the elements that fall under the given condition implemented by the provided function. It also returned a new array with only those elements that satisfy the criteria provided.
Example:
10.forEach() method
The forEach method calls the given function for each element of the array.
Example: