fix hide err
This commit is contained in:
@ -5,7 +5,7 @@ Hides all the elements specified.
|
|||||||
Use the spread operator (`...`) and `Array.forEach()` to apply `display: none` to each element specified.
|
Use the spread operator (`...`) and `Array.forEach()` to apply `display: none` to each element specified.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const hide = (...el) => [...el].forEach(e => (e.style.display = 'none'));
|
const hide = el => [...el].forEach(e => (e.style.display = 'none'));
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in New Issue
Block a user