When the color of myHonda is changed to purple, both arrays are aware of the change. Changes the content of an array, adding new elements while removing old elements. Parameters arrayName is the name of an array. If howMany is 0, no elements are removed. In this case, you should specify at least one new element.
N are the elements to add to the array.
If you don't specify any elements, splice simply removes elements from the array. If you specify a different number of elements to insert than the number you're removing, the array will have a different length at the end of the call. If howMany is 1, this method returns the single element that it removes. If howMany is more than 1, the method returns an array containing the removed elements. It no longer converts undefined elements to null , and it sorts them to the high end of the array.