JavaScript slice method

let cars = ['Audi', 'Volvo', 'Ferrari', 'Ford', 'Shelby'];

//We can copy an entire array using pure .slice()
let allCars = cars.slice();
//Result:
//(5) ['Audi', 'Volvo', 'Ferrari', 'Ford', 'Shelby']

//We can copy only part of the array
let europeanCars = cars.slice(0,3);
//Result:
//(3) ['Audi', 'Volvo', 'Ferrari']

let americanCars = cars.slice(3,5)
//Result:
//(2) ['Ford', 'Shelby']