Slicing arrays is very simple using the slice primitive

Slices from 1st element to 3rd element (not inclusive)

let array = [1, 2, 3, 4, 5];
let slice = &array[1..3];
Result : [2, 3]

We can also copy the rest of the array from a index

let array = [1,2,3,4,5];
let slice = &array[2..];
Result : [3, 4, 5]

Or to a index(not inclusive)

let array = [1,2,3,4,5];
let slice = &array[..2];
Result : [1, 2]

We can do the same thing with strings

let greeting = "Hello Crunchskills🍫";
let crunchskills = &greeting[6..];
Result : "Crunchskills🍫"