This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JavaScript Arrays

The slice() Method

When the slice() method is given two arguments, it selects array elements from the start argument, and up to (but not included) the end argument:

const fruits = [" Banana", " Orange", " Lemon", " Apple", " Mango"];
const citrus = fruits.slice(1,3);
document.getElementById("demo").innerHTML = fruits + "<br><br>" + citrus;