var Node = function (data, left, right) {
  this.data;
  this.left;
  this.right;
}

var BinarySearchTree = function () {
  this.root = null;
}

BinarySearchTree.prototype = {
  constructor: BinarySearchTree,

  insert: function (root, data) {
    if (this.root)
      this.root = newNode;

    if (root === null) {
      root = new Node(data);
      return root;
    } else {
      root.left = this.insert((data <= root.data) ? root.left : root.right, data);
   }
  },

  remove: function (value) {

  }
}

module.exports = BinarySearchTree;

@@ -46,16 +46,23 @@
 his.data
+ = data
 ;%0A  this
@@ -66,16 +66,23 @@
 his.left
+ = left
 ;%0A  this
@@ -87,16 +87,24 @@
 is.right
+ = right
 ;%0A%7D%0A%0Avar
@@ -271,30 +271,30 @@
 if (
-this.root)
+root == null) %7B
 %0A      
-this.
 root
@@ -299,20 +299,27 @@
 ot = new
+ 
 Node
+(data)
 ;%0A%0A    i
@@ -317,24 +317,29 @@
 );%0A%0A    if (
+this.
 root === nul
@@ -344,38 +344,31 @@
 ull)
- %7B
 %0A      
+this.
 root = 
-new Node(data)
+root
 ;%0A  
@@ -395,16 +395,38 @@
  %7D else 
+if (data %3C= root.data)
 %7B%0A      
@@ -453,42 +453,70 @@
 ert(
-(data %3C= root.data) ? root.left : 
+root.left, data);%0A    %7D else %7B%0A      root.right = this.insert(
 root
@@ -530,16 +530,17 @@
  data);%0A
+ 
    %7D%0A  %7D

fix some bugs with bst