What is the difference between splice and slice ?

const array = [1, 2, 3, 4, 5];
array.splice(index, 1);
array.slice(index, 1);

18 Answers
18

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *