delete node between indexes node list js

Solutions on MaxInterview for delete node between indexes node list js by the best coders in the world

showing results for - "delete node between indexes node list js"
Nathaniel
26 Jan 2021
1 
2function deleteNodesBetween(nodeList, startValue, endValue) {
3    for (let actualValue = endValue - 1; actualValue >= startValue; actualValue -= 1) {
4        nodeList.item(actualValue).remove();
5    }
6}
7//deletes nodes from startValue to endValue
8//starts from the end value because starting from the 
9//start value would cause some error with value position changing
10
11
12