how to use .slice on an array in javascript code example
Example: js slice
const arr=[1,2,3,4,5];
const slicedArr = arr.slice(1,4); // slicedArr = [2,3,4]
const arr=[1,2,3,4,5];
const slicedArr = arr.slice(1,4); // slicedArr = [2,3,4]