delNodes[delNodes.length]=listNode;

something along those lines. im not an expert with javascript. basically the logic is putting the item to the end of the delNodes array. the array element you need to add it to is equal to the length of the array currently. for example, if there were 2 things in it already, you need to add the new element to delNodes[2] and delNodes.length is 2.

check into getting the length of an array in javascript.