Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a1d21a

Browse files
committed
Corrected let to const
1 parent 686ba7e commit 3a1d21a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Graphs/NodeNeighbors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Graph {
1717
nodeNeighbors (node) {
1818
// Returns an array with all of the node neighbors
1919
const neighbors = new Set()
20-
for (let edge of this.edges) {
20+
for (const edge of this.edges) {
2121
// Checks if they have an edge between them and if the neighbor is not
2222
// already in the neighbors array
2323
if (edge.node1 === node && !(neighbors.has(edge.node2))) {

0 commit comments

Comments
 (0)