3 ms·
Having to define that extra line becomes really annoying if you are working with code that requires defining lots of callbacks/event handlers (Javascript comes
by stevenwei 16y ago
Having to define that extra line becomes really annoying if you are working with code that requires defining lots of callbacks/event handlers (Javascript comes to mind). Additionally, anonymous functions usually form closures, which can be incredibly convenient as well.