Created
April 18, 2017 00:59
-
-
Save pporche87/64c8450aaf348c2a7a45a0db077793df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let slice = (array, start, end) => { | |
let origArray = array, | |
slicedArray = [] | |
for(let i = origArray[start-1]; i < end; i++) { | |
slicedArray.push(origArray[i]) | |
} | |
return slicedArray | |
} | |
module.exports = slice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment