array-9

let arr = [1, 2, "test", "bob", false, 33];

/*
    Get all elements from second to fifth, 
    not including fifth.
    REMEMBER: JavaScript is zero-based language
    that means that JS starts counting from 0
    not from 1
*/

let sliced = arr.slice(1, 4);
console.log(sliced);
//Output: [2, "test", "bob"];