Another standard problem for tree recursion.
function sumTheTreeValues(root){
if (!root) { return 0}
let a = sumTheTreeValues(root.left)
let b = sumTheTreeValues(root.right)
return a + b + root.value
}
Another standard problem for tree recursion.
function sumTheTreeValues(root){
if (!root) { return 0}
let a = sumTheTreeValues(root.left)
let b = sumTheTreeValues(root.right)
return a + b + root.value
}