Hacker News new | ask | show | jobs
by smysore 5628 days ago
why hasn't anyone suggested this: els[i].addEventListener('click', new Function("","alert("+i+");"),false);

it works fine and it's much shorter and easier to read than nested function declarations