// slice():- extracts the element in the array into an new element , and not chaange the original array
// Array.slice(start,end)
// both start and end are optional
const arr = [1,23,3,4,6,7,9,46];
const arr1=arr.slice(2,7);
console.log(arr);
console.log(arr1);