Tell us what’s happening:
Your code so far
function sumOfTen(arr) {
// change code below this line
let a = arr.splice(1,1);
let b = arr.splice(3,1);
// change code above this line
return arr.reduce((a, b) => a + b);
}
// do not change code below this line
console.log(sumOfTen([2, 5, 1, 5, 2, 1]));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures/remove-items-using-splice