Look at the following code:
for(var j = 0; j <= 12; j++)
{
deck[j] = eval("card_S" + j + "+1");
}
In the eval part, what I need to do is to add one to the variable j, but this is not working – I guess the plus sign inside the string has something to do with it.
So how can I fix this?
Thanks
Do you mean this?
I’d suggest that you take another look at your overall problem though, using
evalfor almost anything usually indicates that you have a design problem somewhere.