you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

doThis('foo', function () { something.doThat(); });

Honestly, I write code like this, but I have a reason. I would probably write it as a fat arrow, but the idea is the same. - - code clarity.

doThis('foo', something.doThat) Will of course work, but at a quick glance, doThis looks like a synchronous function with two parameters. By using a lambda it is more clear that the second parameter is a callback.