This is my go-to:
const $ = document.querySelector.bind(document); const $$ = document.querySelectorAll.bind(document);
This is my go-to:
Tip: browser consoles already have these shortcuts, except $$ returns an actual array there instead of a NodeList.