var n = 1; function some_myfunc() { alert("good job " + n); n++; } var name = "some"; var funcName = name + "_myfunc"; window[funcName](); eval(funcName)();