add(value) {
    
        /*
         * Create a new node to insert into the tree and store the value in it.
         * This node will be added into the tree.
         */
        const newNode = new BinarySearchTreeNode(value);

        // special case: no nodes in the tree yet
        if (this[root] === null) {
            this[root] = newNode;
        } else {

            /*
             * The `current` variable is used to track the item that is being
             * used inside of the loop below. It starts out pointing to
             * `this[root]` and is overwritten inside of the loop.
             */
            let current = this[root];

            /*
             * This is loop is broken only when the node has been inserted
             * in the correct spot or a duplicate value is found.
             */
            while (current !== null) {

                // if the new value is less than this node's value, go left
                if (value < current.value) {

                    //if there's no left, then the new node belongs there
                    if (current.left === null) {
                        current.left = newNode;
                        break;
                    } else {
                        current = current.left;
                    }

                // if the new value is greater than this node's value, go right
                } else if (value > current.value) {

                    //if there's no right, then the new node belongs there
                    if (current.right === null) {
                        current.right = newNode;
                        break;
                    } else {
                        current = current.right;
                    }

                // if the new value is equal to the nodeToRemove one, just ignore
                } else {
                    break;
                }
            }
        }
    }
Adds some value into the tree. This method traverses the tree to find
the correct location to insert the value. Duplicate values are discarded.
@param {*} value The value to add to the tree.
@returns {void}