text: /**
   * // Definition for a Node.
   * function Node(val,children) {
   *    this.val = val;
   *    this.children = children;
   * };
   */
  
  /**
   * @param {Node} root
   * @return {number}
   */
  var maxDepth = function(root) {
      if(!root) return null
      if(!root.children.length) return 1
      return Math.max(...root.children.map(maxDepth)) + 1;
  };