See this fiddle for a good example of a function object and the object that $() returns.
Reference:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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:
Or:
As a function is also an object, you can add properties to it just like any other object: