Build
This commit is contained in:
@ -769,7 +769,7 @@ const zip = (...arrays) => {
|
|||||||
|
|
||||||
### arrayToHtmlList
|
### arrayToHtmlList
|
||||||
|
|
||||||
Converts the given array elements into '<li>' tags and appends them to the list of the given id.
|
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()` and `document.querySelector()` to create a list of html tags.
|
||||||
|
|
||||||
|
|||||||
@ -527,7 +527,7 @@ If lengths of the argument-arrays vary, <code>undefined</code> is used where no
|
|||||||
</code></pre>
|
</code></pre>
|
||||||
</div></div><br/><h2 style="text-align:center;">Browser</h2>
|
</div></div><br/><h2 style="text-align:center;">Browser</h2>
|
||||||
<div class="card fluid"><div class="section double-padded"><h3 id="arraytohtmllist">arrayToHtmlList</h3></div><div class="section double-padded">
|
<div class="card fluid"><div class="section double-padded"><h3 id="arraytohtmllist">arrayToHtmlList</h3></div><div class="section double-padded">
|
||||||
<p>Converts the given array elements into '<li>' tags and appends them to the list of the given id.</p>
|
<p>Converts the given array elements into <code><li></code> tags and appends them to the list of the given id.</p>
|
||||||
<p>Use <code>Array.map()</code> and <code>document.querySelector()</code> to create a list of html tags.</p>
|
<p>Use <code>Array.map()</code> and <code>document.querySelector()</code> to create a list of html tags.</p>
|
||||||
<pre><code class="language-js">const arrayToHtmlList = (arr, listID) => arr.map(item => document.querySelector("#"+listID).innerHTML+=`<li>${item}</li>`);
|
<pre><code class="language-js">const arrayToHtmlList = (arr, listID) => arr.map(item => document.querySelector("#"+listID).innerHTML+=`<li>${item}</li>`);
|
||||||
// arrayToHtmlList(['item 1', 'item 2'],'myListID')
|
// arrayToHtmlList(['item 1', 'item 2'],'myListID')
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
### arrayToHtmlList
|
### arrayToHtmlList
|
||||||
|
|
||||||
Converts the given array elements into '<li>' tags and appends them to the list of the given id.
|
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()` and `document.querySelector()` to create a list of html tags.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user