Hacker News new | ask | show | jobs
by voidr 5381 days ago
You don't have to use inline functions all the time, you can do it like this:

  function foo () {.... }
  function bar () {....foo(); }
  function barfoo () {....bar(); }

  doSomething(barfoo);
1 comments

And remember that 'bind' can save your life

this.io.sockets.on('connection', this.onConnection.bind(this));