Tell us what’s happening:
Describe your issue
Question kindly assist me to understand why slice (1,3) returns “Tiger” from the given array, yet Tiger is not index 3?
Thanks
Your code so far
const arr = ["Cat", "Dog", "Tiger", "Zebra"];
const newArray = arr.slice(1, 3);
newArray would have the value ["Dog", "Tiger"].
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Challenge: Functional Programming - Return Part of an Array Using the slice Method
Link to the challenge: