Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just tried the following:

  for (var i = 0; i < 10; i += 1)
    eval("function function_" + i + "() { print('i am ' + i); }");

  for (i = 0; i < 10; i += 1)
    this['function_' + i]();
but it seems like eval is not supported yet - i guess for good reasons.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: