Closed zanehmw closed 8 years ago
if i wanted to get the second objects eword i could do something like this:
deck[1].eWord
=> "excited"
I could also do something like this:
deck.forEach(function(card){
div = document.createElement("div")
div.innerHTML = card.eWord
document.body.append(div)
})
The above would generate the following html:
<body>
<div>Hello</div>
<div>excited</div>
<div>What is your name?</div>
</body>
Thanks so much!
For my deck of cards I have created multiple objects within an array (displayed below). I would like to create a function of some sorts to display some of the information within the arrays on my page. However , I cannot access the information within the object. How can I zero in on one property within these objects? Or is there an easier way to set up my deck?