--- title: hide tags: browser,css,beginner --- Hides all the elements specified. - Use `NodeList.prototype.forEach()` to apply `display: none` to each element specified. ```js const hide = (...el) => [...el].forEach(e => (e.style.display = 'none')); ``` ```js hide(document.querySelectorAll('img')); // Hides all elements on the page ```