✅Easy and Clean Code (C++ / JavaScript)✅✅✅
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: Stack Space\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n\n\n# C++\n\n```\nclass Solution {\n    void calculateSum(TreeNode* root, int low, int high, int &sum) {\n        if(root == NULL) return;\n        if(root->val >= low && root->val <= high) sum += root->val;\n        calculateSum(root->left, low, high, sum);\n        calculateSum(root->right, low, high, sum);  \n    }\npublic:\n    int rangeSumBST(TreeNode* root, int low, int high) {\n        int sum = 0;\n        calculateSum(root, low, high, sum);\n        return sum;\n    }\n};\n```\n# JavaScript\n```\nvar sum = 0;\n\nlet calSum = (root, low, high) => {\n    if (root == null) return;\n    if (root.val >= low && root.val <= high) {\n        sum += root.val;\n    }\n    calSum(root.left, low, high);\n    calSum(root.right, low, high);\n}\n\nvar rangeSumBST = function(root, low, high) {\n    sum = 0; // Reset sum before each invocation\n    calSum(root, low, high);\n    return sum;\n};\n\n```\n\n![download.jpeg](https://assets.leetcode.com/users/images/3a49c577-475c-4215-9837-7eeb6db43b21_1704691763.8884928.jpeg)\n
['Tree', 'Depth-First Search', 'Binary Search Tree', 'Binary Tree', 'C++', 'JavaScript']