From f94d12fb6c6690065a3d9cee30f946f7e1ff01ea Mon Sep 17 00:00:00 2001 From: Christian Bender Date: Fri, 30 Mar 2018 21:20:14 +0200 Subject: [PATCH] added the let-statment to some methods --- Data Structures/Tree/Binary Search Tree.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Data Structures/Tree/Binary Search Tree.js b/Data Structures/Tree/Binary Search Tree.js index 2cfa73c8f..f4cf5ab72 100644 --- a/Data Structures/Tree/Binary Search Tree.js +++ b/Data Structures/Tree/Binary Search Tree.js @@ -81,7 +81,7 @@ var Tree = (function () { // Start by searching the root Tree.prototype.search = function (val) { - var found = this.root.search(val); + let found = this.root.search(val); if (found === null) { console.log(val + " not found"); } @@ -92,7 +92,7 @@ var Tree = (function () { // Add a new value to the tree Tree.prototype.addValue = function (val) { - var n = new Node(val); + let n = new Node(val); if (this.root == null) { this.root = n; } else {