We're a place where coders share, stay up-to-date and grow their careers.
slice doesn't modify the array and create a new array but splice modified the array
slice doesn't modify the array and create a new array but splice modified the array