Add Items Using splice() bad test case

Test Cases are bugged I think.

arr.splice(0,2, 'DarkSalmon', 'BlanchedAlmond'); = works and does the job, but
arr.splice(0,2, ['DarkSalmon', 'BlanchedAlmond']); = also works but it fails only the first test (htmlColorNames should return [“DarkSalmon”, “BlanchedAlmond”, “LavenderBlush”, “PaleTurqoise”, “FireBrick”])
and not the (You should not use array bracket notation.) if that is what it means by not using the bracket notation.


function htmlColorNames(arr) {
  // change code below this line
  arr.splice(0,2, 'DarkSalmon', 'BlanchedAlmond');
  // change code above this line
  return arr;
} 
 
// do not change code below this line
console.log(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurqoise', 'FireBrick']));

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures/add-items-using-splice

it returns instead [["DarkSalmon", "BlanchedAlmond"], "LavanderBlush", "PaleTurqoise", "FireBrick"]

here splice is adding two items, two strings

here splice is adding only one item, which is an array

this is triggered if you try to solve the challenge doing:
arr[0] = ...

Ah, that makes perfect sense! Got confused since it didn’t show the way it is on the console. Thanks!

While I’m here, is there a way to check how exactly is it added into the array - to see the difference in console when it’s lets say [["DarkSalmon", "BlanchedAlmond"], "LavanderBlush", "PaleTurqoise", "FireBrick"]
and not [“DarkSalmon”, “BlanchedAlmond”, “LavenderBlush”, “PaleTurqoise”, “FireBrick”]

you need to use the browser console for that, the fcc console has some limitations
or a different editor(for example, repl.it)

Literally just turned on the browser console and saw it haha
Nice thanks for your help and time! hopefully I’ll be able to return the favour some day.
Cheers