JS

JavaScript Code Output Challenge - slice array out...

23.

What will be the output of the following code?

const arr = [1, 2, 3, 4, 5];
const slicedArr = arr.slice(1, 3);
console.log(slicedArr);

[3, 4]

[2, 3, 4]

[1, 2]

[2, 3]