384 B
384 B
title, tags
| title | tags |
|---|---|
| show | browser,css,beginner |
Shows all the elements specified.
- Use the spread operator (
...) andArray.prototype.forEach()to clear thedisplayproperty for each element specified.
const show = (...el) => [...el].forEach(e => (e.style.display = ''));
show(...document.querySelectorAll('img'));
// Shows all <img> elements on the page