A binary search tree implementation in JavaScript