I am trying to decipher a .js script and I am finding it filled with $ throughout? Is there any reason to use this? I’m pretty new to JavaScript.
Share
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.
I think you are reading a JavaScript library famously known as jQuery (or possibly another library). The
$is just a short form for a namespace or use as an identifier.You can think of it like this
jQuery('p')to select all the paragraphs on a page,or for short form you can just write
$('p').Here is a link for jQuery tutorials/docs jQuery
Here is a list of standards section 7.6 describes it in detail ECMA Standard