Hacker News new | ask | show | jobs
by Autre 5632 days ago
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.