//children holds the NodeList Object with the child nodes var nrofchildren = children.length;