text: /**
   * Definition for a binary tree node.
   * function TreeNode(val) {
   *     this.val = val;
   *     this.left = this.right = null;
   * }
   */
  /**
   * @param {TreeNode} root
   * @return {number[]}
   */
  var inorderTraversal = function(root) {
      if (!root) {
          return [];
      }
      if (!root.left && !root.right) {
          return [root.val];
      }
      var left = inorderTraversal(root.left);
      var right = inorderTraversal(root.right);
  
      return left.concat([root.val]).concat(right);
  };
  