I\'ve a simple FOR statement like this:
var num = 10,
reverse = false;
for(i=0;i
when rever
var num = 10,
reverse = false;
if(!reverse) for( var i=0;i
EDIT:
As noted in the comments below, if i is not declared elsewhere and you do not intend for it to be global, then declare it with the other variables you declared.
And if you don't want to modify the value of num, then assign it to i first.
var num = 10,
reverse = false,
i;
if(!reverse) for(var i=0;i