https://github.com/jackhowa/slasher-flick
Return the remaining elements of an array after chopping off n elements from the head.
https://github.com/jackhowa/slasher-flick
algorithm freecodecamp javascript
Last synced: 9 months ago
JSON representation
Return the remaining elements of an array after chopping off n elements from the head.
- Host: GitHub
- URL: https://github.com/jackhowa/slasher-flick
- Owner: JackHowa
- Created: 2017-08-09T21:36:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-09T21:48:26.000Z (over 8 years ago)
- Last Synced: 2025-01-21T16:44:22.357Z (11 months ago)
- Topics: algorithm, freecodecamp, javascript
- Language: JavaScript
- Homepage: https://www.freecodecamp.org/challenges/slasher-flick
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slasher Flick
Return the remaining elements of an array after chopping off n elements from the head.
The head means the beginning of the array, or the zeroth index.
## Solution
I used slice to begin at the howMany point. In this way, I didn't really need to delete from the head, or start, of the array.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice