Inorder traversal
A binary tree traversal pattern using depth first search that first visits the left node, then the current node, then the right node.
function inorder(node) {
if (node) {
inorder(node.left);
console.log(node.val);
inorder(node.right);
}
}