I want to concatenate a sum from a number to a string in JavaScript and had to resort to an auxiliary variable.
What I did first (incorrect example):
for (var i; i < x; i++)
h = "texto" + x+1 + ".txt";
Then:
for (var i; i < x; i++){
var a = i+1;
h = "texto" + a + ".txt";
}
Any solution for me to avoid that auxiliary variable?
Note: This is not the code I'm working on right now, it's just to exemplify my problem. The solution to change% w / o% by% w / o% does not apply in my case.