Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 686ba7e commit 3a1d21aCopy full SHA for 3a1d21a
1 file changed
Graphs/NodeNeighbors.js
@@ -17,7 +17,7 @@ class Graph {
17
nodeNeighbors (node) {
18
// Returns an array with all of the node neighbors
19
const neighbors = new Set()
20
- for (let edge of this.edges) {
+ for (const edge of this.edges) {
21
// Checks if they have an edge between them and if the neighbor is not
22
// already in the neighbors array
23
if (edge.node1 === node && !(neighbors.has(edge.node2))) {
0 commit comments