Imagine a scenario where the variables are structured this way:
localStorage.var1a = 0;
localStorage.varnum = 1000;
Now, consider the following code snippet:
for(x = 1; x < localStorage.varnum; x++){
if(localStorage.var.x.a > 0){
localStorage.var.x.a = Number(localStorage.var.x.a);
}else{
localStorage.var.x.a = 0;
}
}
The challenge I'm facing is in combining x and localStorage.var * a;