Travis build: 2040

This commit is contained in:
30secondsofcode
2018-05-07 08:34:21 +00:00
parent 21e61ef769
commit a011873e18
3 changed files with 15 additions and 7 deletions

View File

@ -2992,11 +2992,14 @@ zipWith(
Converts the given array elements into `<li>` tags and appends them to the list of the given id.
Use `Array.map()` and `document.querySelector()` to create a list of html tags.
Use `Array.map()`, `document.querySelector()`, and an anonymous inner closure to create a list of html tags.
```js
const arrayToHtmlList = (arr, listID) =>
arr.map(item => (document.querySelector('#' + listID).innerHTML += `<li>${item}</li>`));
(el => (
(el = document.querySelector('#' + listID)),
(el.innerHTML += arr.map(item => `<li>${item}</li>`).join(''))
))();
```
<details>

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,10 @@ Use `Array.map()`, `document.querySelector()`, and an anonymous inner closure to
```js
const arrayToHtmlList = (arr, listID) =>
(el => (el = document.querySelector('#' + listID),
el.innerHTML += arr.map(item => `<li>${item}</li>`).join('')))()
(el => (
(el = document.querySelector('#' + listID)),
(el.innerHTML += arr.map(item => `<li>${item}</li>`).join(''))
))();
```
```js