About Lesson
Slice Array:
The slice() method returns a new array containing a portion of the array on which it is implemented. The original remains unchanged.
Example:
var x = [“Ram”, “Arman”, “Raghav”, “Manav”];
slice(start, end);
Splice Array:
The splice() method is an inbuilt method in JavaScript which is used to modify the contents of an array by removing the existing elements and/or by adding new elements.
Example:
var x = [“Ram”, “Arman”, “Raghav”];
splice(index, howmany, “new value”, Delete);
Exercise Files
No Attachment Found
Join the conversation