Implement Binary Search Tree Javascript