Count Subarrays With Given Sum Leetcode Javascript