JavaScript - Beg to Adv - Arrays Question 9

Last Updated :
Discuss
Comments

What is the output of the following code snippet?
const arr = ["apple", "banana", "orange"];
const newArr = arr.slice(1, 2);

console.log(newArr);

["apple", "banana"]

["banana", "orange"]

["banana"]

["orange"]

Share your thoughts in the comments