A Pen by Andy Novocin on CodePen.
Created
September 21, 2018 20:37
-
-
Save AndyNovo/84c47698b9beb53f6f4f84872aa406c1 to your computer and use it in GitHub Desktop.
rZRPyJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="stuffhere"> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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