Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

My Solution to Tree Walker

137 views
Skip to first unread message

Omer Braha

unread,
Jan 8, 2020, 3:44:42 AM1/8/20
to Intro to JavaScript
nextNode = function(node) {
if(node.firstChild) return node.firstChild;
  while(!node.nextSibling) node=node.parentNode;
  return node.nextSibling;
};
Reply all
Reply to author
Forward
0 new messages