fix snippets/hide.md
This commit is contained in:
@ -10,7 +10,7 @@ Hides all the elements specified.
|
|||||||
- Use `NodeList.prototype.forEach()` to apply `display: none` to each element specified.
|
- Use `NodeList.prototype.forEach()` to apply `display: none` to each element specified.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const hide = (...el) => [...el].forEach(e => (e.style.display = 'none'));
|
const hide = nodes => nodes.forEach(e => (e.style.display = 'none'));
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in New Issue
Block a user