tags:

views:

66

answers:

2

var action = ['function1','function2' etc ]

var obj = new objectcreate ();

for (functionname in action){

obj+'.'+action[variablename]+'()';

}

the functions are already generated I just wanna go through an array and execute all the functions it on the object i created thanks for your help

+3  A: 

You should be able to do this.

obj[action[functionName]]();
Daniel A. White
+2  A: 

obj[action[functionname]](); will do the trick.

Li0liQ
Worked like a charm! thanks a million!
salmane