Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript function

function walkTree(node) {
  if (node === null) {
    return;
  }
  // do something with node
  for (let i = 0; i < node.childNodes.length; i++) {
    walkTree(node.childNodes[i]);
  }
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #function
ADD COMMENT
Topic
Name
1+9 =