Skip to content

Instantly share code, notes, and snippets.

@danomanion
Created March 7, 2019 15:33
Embed
What would you like to do?
List - JS / HTML
<div id="container">
</div>
const items = [
'thingie',
'another item',
'some thingie',
'yadda yadda'
];
function listOfStuff() {
let full_list = '';
for (let i = 0; i < items.length; i++) {
full_list = full_list + `<li> ${items[i]} </li>`
}
const contain = document.querySelector('#container');
contain.innerHTML = `<ul> ${full_list} </ul>`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment