splice() Example 2 splice() Example 2 This example defines an array [2, 5, 9] then removes the 5 and 9, inserting 100, 200, and 300 in their place.
This example defines an array [2, 5, 9] then removes the 5 and 9, inserting 100, 200, and 300 in their place.