document.getElementsByTagName returned me a NodeList object.
document.getElementsByTagName
I would like to remove some items (let\'s say I would like to remove the first item from th
Just have the same use case as you.
For ES6 you can do this:
const myNodeList = ele.childNodes; const [head, ...tail] = myNodeList; console.log('the first item: ', head); console.log('the remaining items: ', tail);
JavaScript ES6— The Spread Syntax (…)