Seems like this should be working, any idea why it's not? Interestingly enough, when I set tilt to an object it does work. My hunch is it has something to do with recursion and global variable value timings but unsure. Would appreciate any pointers or illumination.

Fails:

```
let tilt = 0;
var findTilt = function(root) {
dfs(root);
return tilt;
};
var dfs = function(root) {
if (!root) {
return 0;
}
let left = dfs(root.left);
let right = dfs(root.right);
tilt += Math.abs(left - right);
return root.val + left + right;
}
```

Works:

```
var findTilt = function(root) {
const tilt = { val: 0 }
dfs(root);
return tilt.val;
};
var dfs = function(root) {
if (!root) {
return 0;
}
let left = dfs(root.left);
let right = dfs(root.right);
tilt.val += Math.abs(left - right);
return root.val + left + right;
}
```