Evaluating an arithmetic expression from a binary tree
This is not a search tree.  You can call it an abstract syntax tree, or just a binary tree.  

You can use a dispatch table to evaluate ops.

 dispatch = {
      '+': (a,b) =&gt; a+b,
      '*': (a,b) =&gt; a*b
 }
 ...
 if (node.left &amp;&amp; node.right &amp;&amp; node.value in dispatch) dispatch[node.value]( traverse(node.left), traverse(node.right) );