SyntaxFix
Write A Post
Hire A Developer
Questions
I'm very late to the party, but since element.lastChild.nextSibling === null, the following seems like the most straightforward option to me:
element.lastChild.nextSibling === null
for(var child=element.firstChild; child!==null; child=child.nextSibling) { console.log(child); }