Traversing nodes: Why check if node was included already?

前端 未结 0 1397
孤独总比滥情好
孤独总比滥情好 2021-02-03 11:21

In this breadth first traversal of a DOM, what is the purpose of visitedNodes array and how does !visitedNodes.includes(currentNode) work? What if I h

相关标签:
回答
  • 消灭零回复
提交回复
热议问题