Let's say I have an array of numbers presented in this format:
[5, 29, 1, 5, 4919, 109, 17]
My goal is to transform this array into pairs of numbers based on their index within the array. The desired output would look like this:
[[0, 5], [1, 29], [2, 5], [3, 4919], [4, 109], [5, 17]]
Any suggestions or examples on how to achieve this using javascript?