Javascript solution
```\nvar rangeSumBST = function(root, L, R) {\n    var sum = 0;\n    if (root == null) {\n        return sum;\n    }\n\n    if (root.val > L) {\n        sum += 
```\nvar rangeSumBST = function(root, L, R) {\n    var sum = 0;\n    if (root == null) {\n        return sum;\n    }\n\n    if (root.val > L) {\n        sum += rangeSumBST(root.left, L, R);\n    }\n    if (root.val <= R && root.val >= L) {\n        sum += root.val;\n    }\n    if (root.val < R) {\n        sum += rangeSumBST(root.right, L, R);    \n    }    \n    \n    return sum;\n};
['JavaScript']