0

How do you turn an two dimensional array? In my case I have an array that contains the score a player has on a specific round of the game.

I have

var results = new Array();  
for(var i = 1;i<7;i++){  
results[i] = new Array;  
}

which I print out as such results[round][player]

How do I "turn" the array, so I can get the data like this: results[player][round]
(Without changing the definition of the results array)

Slason
  • 3
  • 4

0 Answers0