Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created September 21, 2018 20:37
Show Gist options
  • Save AndyNovo/84c47698b9beb53f6f4f84872aa406c1 to your computer and use it in GitHub Desktop.
Save AndyNovo/84c47698b9beb53f6f4f84872aa406c1 to your computer and use it in GitHub Desktop.
rZRPyJ
<ul id="stuffhere">
</ul>
//Display this list on a page
var listofstuff = ["andy", "sara", "simone", "celine"];
var updateScreen = function(listofstuff){
document.getElementById("stuffhere").innerHTML = "";
for(var i=0; i < listofstuff.length; i++){
document.querySelector('#stuffhere').innerHTML += `<li>${listofstuff[i]}</li>`;
}
}
updateScreen(listofstuff);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment