123456789
var invertTree = function(root) { if (!root) { return null; } [root.right, root.left] = [root.left, root.right]; invertTree(root.left); invertTree(root.right); return root;};