Mistake in Glossary

See screenshot. Since arrays start at index of 0, then index 1 = apples. Index 3 = carrots.

The glossary shows bananas which is index 2.

newArray should be equal to [‘apples’ , ‘carrots’].

Hey there, the .slice() method copies a portion of an array into a new array. The first argument is an index of where to start slicing, and the 2nd argument is an index of where to stop slicing. The element at that index is not included in the new array.

In the example from the glossary, the slicing begins at “apples” (index 1) and ends at “carrots” (index 3). “carrots” is not included in the new array. That means the new array will only contain “apples” and “bananas”.

Hope this clears things up!
Ben