DEV Community

Discussion on: Use $ & $$ Instead of document.querySelector/All in JavaScript without jQuery

Collapse
 
vaaski profile image
vaaski • Edited

one question.
i always did it like this:

const $ = s => document.querySelector(s)
Enter fullscreen mode Exit fullscreen mode

what are the differences?

Collapse
 
usamaejaz profile image
Usama Ejaz

this