I have a variable player.result which is created six times. Each of these times it is added to player.participant.taxGame.totincome.
Although it is not clear from the code (this is part of an app), this line works properly. So player.result is neatly added to player.participant.taxGame.totincome six times.
I however want to store each of those instances of player.result seperately in a variables which is called something like player.round1, player.round2 etc. I have tried to do this with a for loop.
It currently looks like this:
player.participant.taxGame.totincome = player.participant.taxGame.totincome + player.result;
for ( i=1; i < 6; i++) {
player.rounds[i] = player.result
};
Where am I going wrong?
player.rounds) with the same value:player.resultplayer.resultwhich is created six times." No,player.resultis not a variable, and variables are created once, not six times. Show code; don't paraphrase it.