Can you please help me with one loop with functions:
I have 7 functions:
function menu1(){};
function menu3(){};
function menu4(){};
function menu5(){};
function menu6(){};
function menu7(){};
And what i need to do is load as a function menux(){} I mean from the loop if x == 3 load function menu3().
for(x=1;x=8;=x++)
{
function menux(){};
}
You can wrap your function into an object:
And then, you can cosume that into the for:
There are a lot of ways of doing that, you can also do:
I hope that it helps.