Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Zardoz84
· 10mo ago · 0 comments
const $ = document.querySelectorAll
Comments
[–]
Tistron
10mo ago
I usually do
const $ = (s, e = document) => e.querySelector(s)
and a similar one for $$.
[–]
recursive
10mo ago
Probably have to bind the this value.