What would be the output of the following code? (Based on Array Slice)

@Devtools Tech
const array = [1,2,3,4,5];

console.log(array.slice(2,4));
Option 1
[3, 4]
Option 2
[3, 4, 5]
Option 3
[2, 3]
Option 4
[1, 2, 3]
Option 5
[2, 3, 4]
Do you see value in our efforts?

Devtools Tech is a free platform for Frontend Engineers. It takes a lot of time, effort, and finanical resources to keep the platform running. If you see any value in our work and would like to support us then you can do using the following options.

InternationalDomestic