diff --git a/snippets/hide.md b/snippets/hide.md index 24b1ed544..3c396cec4 100644 --- a/snippets/hide.md +++ b/snippets/hide.md @@ -2,12 +2,12 @@ Hides all the elements specified. -Use `Array.forEach()` to apply `display: none` to each element specified. +Use `NodeList.prototype.forEach()` to apply `display: none` to each element specified. ```js const hide = els => els.forEach(e => e.style.display = 'none'); ``` ```js -hide(...document.querySelectorAll('img')); // Hides all elements on the page +hide(document.querySelectorAll('img')); // Hides all elements on the page ```