I started to solve the algorithm problems from last week. I used and learned this method today.
arr.slice([begin[, end]])
Here is a quick example:
[example] arr.slice(1, 3);
[example] arr.slice(-3, -1);
A new array containing the selected elements.