If you have a function that takes a function as a parameter, and you don’t have code to pass it, you can pass $.noop .
I cannot think of such cases in jQuery where the parameter is not optional, however.
Unlike the function(){} entry, passing $.noop will not create a new instance of the function, saving a bit of memory. However, if you pass it to modify the object of the function (for example, funcParam.id = 2 ), passing $.noop will be ruined.
SLaks Jan 15 2018-10-15T00: 00Z
source share