arrays - Does element.childNodes[] behave as a link list in javascript? -


i have element object , has children appended via appendchild(node) method,i know can access them element.childnodes[index].

now if remove element selecting them id element @ index i+1 @ index i if removed 1 @ index i?

secondly there way remove object array specifying indices via built in method achieve linked list behaviour(i mean without having copy elements index prior index when remove 1 prior them)?

1) yes

2) try array.splice:

> = [0,1,2,3,4,5] [0, 1, 2, 3, 4, 5] > a.splice(3, 1) [3] > [0, 1, 2, 4, 5] 

don't know if arrays or nodelists implemented linked lists or else. depends on engine guess.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -