diff --git a/snippets/hide.md b/snippets/hide.md index 89a544d39..c4d1af1a8 100644 --- a/snippets/hide.md +++ b/snippets/hide.md @@ -10,7 +10,7 @@ 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')); +const hide = nodes => nodes.forEach(e => (e.style.display = 'none')); ``` ```js