JavaScript Array Splice

JavaScript Array Splice


JavaScript Array splice() 
In this Tutorial, we will learn about JavaScript Array splice() method with the help of following below:
The splice() method will change the original array by removing or adding the element.
Syntax
Array.splice(startIndex, numbers of elements, elements to add);
Example1-
Output
Example2
Output