You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let car = ["Audi", "BMW", "Bajaj", "Aston Martin"];
78
+
car.splice(1, 0, "Chevrolet", "Chrysler");
79
+
80
+
car;
81
+
(6) ["Audi", "Chevrolet", "Chrysler", "BMW", "Bajaj", "Aston Martin"] // Added Chevrolet to car array at index of 1 and followed by Chrysler. Since Second argument is 0, none of the item is removed from an array.
82
+
let result =car.splice(1, 1); ["Chevrolet"] // Returns the removed item
0 commit comments