From 9dd82662b2bb03b957cf04470f68633a3e1a018f Mon Sep 17 00:00:00 2001 From: Felix Wu Date: Wed, 29 Aug 2018 23:08:11 +0200 Subject: [PATCH] Update hide.md --- snippets/hide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ```