Question: HTML, JavaScript I'm having trouble getting my objects to show up. If you have a webpage and with single button on the webpage centered on

HTML, JavaScript

I'm having trouble getting my objects to show up. If you have a webpage and with single button on the webpage centered on the site , when you click the button, all the items in your array of objects list, (including the picture correlated to it) shows up in a div below it. This means no items in the array show up unless the button is pressed. Use a loop and innerHTML to do this.

For example given

var arrayOfObjects = [

{id: "1", name: "obj1", age: 100, price:"$1.00", picture:"object1.jpg"},

{id: "2", name: "obj2", age: 200, price:"$2.00", picture:"object1.jpg"},

{id: "3", name: "obj3", age: 300, price:"$3.00", picture:"object1.jpg"},

Please help and provide comments so I can understand. It should look like this..

.HTML, JavaScript I'm having trouble getting my objects to show up. If

you have a webpage and with single button on the webpage centered

Click me to display Javascript Objects! Click me to display Javascript Objects! Name: Apricots Price: $2.99 Name: Coconuts Price: $3.45 Name: Cherries Price: $5.75

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!