Add Items Using splice()

Add Items Using splice()
0

#22

I found this thread because I am on this challenge currently, and I understood from the previous challenge that the .splice() method takes up to three arguments. It was not conveyed that the third argument is a comma separated list that can be confused with more than three arguments. I was trying

function htmlColorNames(arr) {
  // change code below this line
  arr.splice(0,2,['DarkSalmon','BlanchedAlmond']);
  // change code above this line
  return arr;
}

and by finding this thread, I came across

and

These both helped me to see what I believe was lacking in understanding from the materials provided in the challenges. I was trying to pass in an array because I thought only one “argument” could come after the second comma of the list of arguments passed into the .splice() method

I would recommend further clarification be added in regards to the .splice() method parameters.