javascript – variable out of the loop

if you want to build a js counter in izzy you have to store the actual number outside of the loop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* in our main function we establish the variable
*/

function main()
{
var e;
e=0;

//now we are calling the loop part of our main function
main = function()
{
    print(e + " \r");
    e ++;
    return arguments[0] + 1;
}
}