Question: Create a JSON and display it on the screen. Pick from 3 options with the following properties: Fruits : Color, season, environment (tropical, cold, etc),

Create a JSON and display it on the screen. Pick from 3 options with the following properties:

Fruits: Color, season, environment (tropical, cold, etc), average number seeds

Games: Title, platform, genre, number of awards

Songs:

Title artist genre number of awards

Requirements Make a JSON variable with at least 10 records (10 fruits, games, or songs) Make a button for the to press and show the data Add a table element with appropriate column headers (th) to display the data in the table Use JavaScript to put ALL JSON data (all 10 records) in the html table Put JavaScript in a separate (js) file

Handy Skills

JavaScript - Arrays - Objects - Object properties - JSON

- How to call a function - Using JS in a separate file - console.log HTML - Button element - Table element - Giving elements the id attribute

Use JSON in a separate file. Give it a shot by putting your JS in a separate file with a .json file extension (myFile.json - or whatever you want to name it). Try to load the table with the same 10 records.

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!