Tell us what’s happening:
I recently have been working through the JavaScript algorithm problems, when I encountered a code I entered that froze the page of the slasher problem. The rest of your website works, including all other algorithm problems. But returning to the page it remains in a frozen state even when I use another computer and I cannot proceed in the free code Camp.
Please let me know if anyone can or knows how to debug the page for me.
warning code below may crash the slasher page
Your code so far
function slasher(arr, howMany) {
var newArray = [];
for (var i=0; i < arr.length; i+=howMany) {
newArray.push(arr.splice( i , i-howMany));
}
return newArray;
}
slasher([1, 2, 3], 2);
https://www.freecodecamp.org/challenges/slasher-flick