4 ms·
How so? Who stops you from doing something like `const $ = document.querySelector`?
by frabert 6y ago
How so? Who stops you from doing something like `const $ = document.querySelector`?
- cphoover 6y agoGood point
- Epskampie 6y agoThere's a ton of other functions you need like element.addEventListener, insertAdjacentElement, XMLHttpRequest (when you need progress) etc. etc. At that point you might as well save yourself and the person after you a major headache and just use jQuery whose API everybody knows.
- cortesoft 6y agoThe big magic of jQuery is that you can act on an array of elements as if it were a single element. Your alias does not give you that at all.