var fnc=[]; fnc[0]=function (){alert(0)}; fnc[1]=function (){alert(1)}; fnc[2]=function (){alert(2)}; for (var i=0; i<fnc.length; i++) { fnc[i](); };