DEV Community

Discussion on: Implementing a Basic Binary Search Tree in JavaScript

Collapse
 
josepedrolorenzini profile image
Jose_Lorenzini • Edited

hi Sean
thanks for your code , looks nice look this is a silly question ,
but how i can initite and create new object with this class?
i did this :::

let nodos = new Node();
nodos.insert(1);
nodos.insert(9);
then i type:
console.log(nodos.contains(9));
give me null.

please let me know i am learning algorithms with java and trying to learn deep javascript .
thanks