JavaScript Arrays

The splice() Method

The splice() method adds new elements to an array, and returns an array with the deleted elements (if any):