How to Select All Matching Elements with querySelectorAll in JavaScript
document.querySelectorAll(selector) gives you every element on the page that matches a CSS selector, as a list you can loop over with for...of. When nothing matches, the list is empty, so a loop over it simply doesn't run.
