JavaScript - You have an array of integers, nums, and an array queries, where queries[i] is a pair of indices. Find the sum of the elements in nums from the indices at queries[i][0] to queries[i][1] (inclusive) for each query, then add all of the sums for all the queries together.