I mean object as in {} [object Object]. How does it do $(selector) and $.fn.init at the same time?
{} [object Object]
$(selector)
$.fn.init
Can you give me a simple ex
Javascript is an object oriented language, so functions ARE objects, just fancy ones that you can call.
foo = function() { console.log("foo") } foo.bar = function() { console.log("bar") } foo() //=> prints "foo" foo.bar() //=> prints "bar"