0

JS: What does "
quot; do?

What does "

quot; do in JavaScript? I've been looking for the answer on the web and it just comes up with other symbols. I don't know if this helps, but I think it has something to do with JQuery. I want to know so I can read people's JS codes easier to learn and see what they do to apply it in my own. Thanks everyone :)

19th Mar 2018, 2:30 PM
Taylor Scadden
3 Answers
+ 4
jQuery, and most javascript libraries use the $ as the primary base object (or function). Most of them also have a way to relinquish the $ so that it can be used with another library that uses it. In that case you use jQuery instead of $. In fact, $ is just a shortcut for jQuery.
19th Mar 2018, 2:34 PM
Baraa AB
Baraa AB - avatar
+ 6
Yes you got right! In general, the $ symbol was used to denote a jQuery object in JavaScript. It's possible to wrap a DOM element into jQuery object or using a selector similar to CSS. 📖 Extra read https://learn.jquery.com/using-jquery-core/jquery-object/
19th Mar 2018, 2:38 PM
Zephyr Koo
Zephyr Koo - avatar
+ 3
In JS '
#x27; is just a valid character to start an identifier (a variable name), as well as '_' (underline) and any alphabetic character... All others character are ot valid for first character of identifier (but others, such as numeric) are valid if not at first position. That's also valid identifier to use it as unique character. JQuery library (but not "most javascript libraries", maybe some, but I don't even believe) use '
#x27; as the short primary base identifier. Underscore library use '_' in a same way. As @Zephy Koo specify, most of the time, presence of '
#x27; in code denote the use of JQuery library, but not necessarly ;)
20th Mar 2018, 2:50 AM
visph
visph - avatar