Skip to content

Commit e136ecc

Browse files
author
Christian Bender
authored
Merge pull request TheAlgorithms#51 from christianbender/added_let_tree
added the let-statment to some methods
2 parents 17a6fab + f94d12f commit e136ecc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Data Structures/Tree/Binary Search Tree.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ var Tree = (function () {
8181

8282
// Start by searching the root
8383
Tree.prototype.search = function (val) {
84-
var found = this.root.search(val);
84+
let found = this.root.search(val);
8585
if (found === null) {
8686
console.log(val + " not found");
8787
}
@@ -92,7 +92,7 @@ var Tree = (function () {
9292

9393
// Add a new value to the tree
9494
Tree.prototype.addValue = function (val) {
95-
var n = new Node(val);
95+
let n = new Node(val);
9696
if (this.root == null) {
9797
this.root = n;
9898
} else {

0 commit comments

Comments
 (0)