showing results for - "javascript get subset of array"
Giacomo
07 Mar 2020
1var fruits = ["Banana", "Orange", "Lemon", "Apple", "Mango"];
2var citrus = fruits.slice(1, 3);
3// ["Orange", "Lemon"]
Annmarie
15 May 2019
1var colors = ["red", "black", "green", "yellow", "blue","brown"];
2var subset_of_colors = colors.slice(1, 3); //["black", "green"]