Travis build: 388
This commit is contained in:
@ -3792,10 +3792,10 @@ isBrowserTabFocused(); // true
|
||||
|
||||
Converts a `NodeList` to an array.
|
||||
|
||||
Use `Array.prototype.slice()` and `Function.prototype.call()` to convert a `NodeList` to an array.
|
||||
Use spread operator inside new array to convert a `NodeList` to an array.
|
||||
|
||||
```js
|
||||
const nodeListToArray = nodeList => Array.prototype.slice.call(nodeList);
|
||||
const nodeListToArray = nodeList => [...nodeList];
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
Reference in New Issue
Block a user