
slice(2,-1) extracts the third element through the second-to-last element in the sequence. A negative index can be used, indicating an offset from the end of the sequence. For example, slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). slice extracts up to but not including end. end Optional Zero-based index before which to end extraction.

If begin is greater than the length of the sequence, an empty array is returned. If begin is undefined, slice begins from index 0. slice(-2) extracts the last two elements in the sequence. Parameters begin Optional Zero-based index at which to begin extraction.

If you'd like to contribute to the interactive demo project, please clone and send us a pull request. The source for this interactive demo is stored in a GitHub repository.
