We have one ul element with four li child element contained within then lets say the following code is executed in the console
var a = document.getElementsByTagName("ul")[0];
a.childNodes.splice(1, 2, "abc", "cde");
Then the error pops up with the message:
TypeError: a.childNodes.splice is not a function
What's wrong here?