You are given an array of integers nums and a list of queries. Each element in queries contains [i, j], meaning the query asks for nums[i] ^ nums[i + 1] ^ ... ^ nums[j], the bitwise XOR of every element in nums from index i to index j, both ends inclusive.
Return an array answer where answer[k] is the result of the k-th query in queries.