24 modern ES6 code snippets to solve practical JS problems

PHOTO EMBED

Fri Mar 05 2021 19:30:48 GMT+0000 (Coordinated Universal Time)

Saved by @w_jellett

const hide = (...el) => [...el].forEach(e => (e.style.display = 'none'));

// Example
hide(document.querySelectorAll('img')); // Hides all <img> elements on the page
content_copyCOPY

https://madza.hashnode.dev/24-modern-es6-code-snippets-to-solve-practical-js-problems?guid