See this fiddle for a good example of a function object and the object that $()
returns.
Reference:
See this fiddle for a good example of a function object and the object that $()
returns.
Reference:
No, that's not how you create a function object, that's how you create an object.
To create a function object, you just create a function. For example:
var function_object = function(){};
Or:
function F(){}
var function_object = F;
As a function is also an object, you can add properties to it just like any other object:
function_object.myProperty = 42;
function_object.doSomething = function(){};