Tell us what’s happening:
This doesnt make sense to me. according to everywhere else arr.splice(2) should return [1,2] (if youre using the first example) however it returns [3]. i thought the proper syntax was supposed to be arr.splice(0, howMany)… whats going on here?
Your code so far
function slasher(arr, howMany) {
// it doesn't always pay to be first
arr = arr.splice(howMany);
return arr;
}
slasher([1, 2, 3], 2);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/slasher-flick