Travis build: 283

This commit is contained in:
30secondsofcode
2018-08-29 21:11:17 +00:00
parent 3694a222c1
commit 02822336f0
3 changed files with 6 additions and 6 deletions

View File

@ -3679,17 +3679,17 @@ hashBrowser(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then
Hides all the elements specified.
Use the spread operator (`...`) and `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 = (...el) => [...el].forEach(e => (e.style.display = 'none'));
const hide = els => els.forEach(e => (e.style.display = 'none'));
```
<details>
<summary>Examples</summary>
```js
hide(...document.querySelectorAll('img')); // Hides all <img> elements on the page
hide(document.querySelectorAll('img')); // Hides all <img> elements on the page
```
</details>