+ 1

Please someone explain what does $ sign meaning in js ?

I have seen $ sign in many places but cannot understand , would be grateful if someone explains , thankyou.

22nd May 2021, 10:45 AM
Sneha
Sneha - avatar
3 Answers
+ 2
a js variable name could start with either a letter, an underscore or a dollar sign... the well known jQuery library use it alone to short reference its main object function, wich its basic purpose is to select an element in the dom. that's why even without using jQuery a lot of js coders use it as a prefix to any variable holding a dom element ^^ however, it could mean anything and be used as variable name or part of variable name wich hold anything else ;P (coders coming from Php should use it as required variable name prefix, so they could also keep this habit from there...)
22nd May 2021, 4:14 PM
visph
visph - avatar
22nd May 2021, 11:14 AM
Jayakrishna 🇼🇳
0
It is used to reference a jQuery function type or library .You know that jQuery is a JavaScript library?
22nd May 2021, 12:19 PM
HBhZ_C
HBhZ_C - avatar