var postorderTraversal = function(root) {
const res = []
postorderTraversalNode(root, (v) => res.push(v))
return res
};
var postorderTraversalNode = function(node, callback) {
if (node !== null) {
postorderTraversalNode(node.left, callback)
postorderTraversalNode(node.right, callback)
callback(node.val)
}
}