In jQuery, what is the difference between $
and $.
? Please provide a practical explanation if possible.
I presume you are asking about the syntactic difference between $('#selector');
and $.parseJSON(str);
.
The former is an invocation of a function called $
and the latter invokes it's method called parseJSON
. Yup, functions can have methods - it is possible because Javascript functions are also objects. Figuratively speaking: