Sometimes in JQuery we define variable as var $a=$()
which is like declaring a function. So i want to know does it make any change if we define variable as var a
only?
If you mean:
var a = $(/* Object or Selector gets passed here */)
Then the only difference would be the name. Developers use $a
to indicate that the value is already jQuery
-ied. Leaving it off changes no functionality but would be a dis-service to future developers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With