3 ms·
jquery, lodash, etc all added prefixes (or TIL: sigil) of somesort
by dylan604 5y ago
jquery, lodash, etc all added prefixes (or TIL: sigil) of somesort
- throw_m239339 5y ago> jquery, lodash, etc all added prefixes (or TIL: sigil) of somesort This is false they are not sigils at all. _ and $ are legal variable names in Javascript.
- nobleach 5y agojQuery's $ and lodash's _ are not prepended to a symbol to denote a variable. Both are objects actually. In the case of jQuery, $ === jQuery (the root jQuery object). The case that the parent is talking about is PHP's requirement that all variables are denoted as such `$variable_name`. (Perl and Bash also do this)
- dylan604 5y agoi forget that's what's actually being done under the hood.
- graftak 5y agoThat’s just (part of) the variable name and not really the same.