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
for (functionname in action)doesn't do what you think;functionnamewill be properties of the Array, which may not be in numerical order and can return other properties depending on browser. Never usefor...inon Array. Instead use the plain old C-style loopfor(var i= 0; i<array.length; i++).