Skip to content

mm-intro-js/js-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JS Data Assignment

Assignment Goals:

  • gain a deeper appreciation for how JavaScript variables are created scoped
  • create JSON Data to represent an object
  • build objects from JSON data
  • use jQuery Ajax methods to add HTML to display the object

GitHub Repository

https://github.com/htc-ccis2591/js-data/

You’ll want to begin each assignment by forking the repository and cloning it locally. When you are done, you’ll push to GitHub and submit a pull request.

Moonflower Feature

A new section was added to the HTML to feature an item from the menu.

Put the Data into JSON

Use the information below to write JSON to hold the featured items for the week. Store this in a separate JSON file. Each featured item has a name, image, and description. There are two featured items this week, but there may be more later, so put them in an array and make sure that your JavaScript can process any number of featured items.

Item 1:

  • name: "Hazelnut Cappuccino",
  • image: "images/cappuccino.jpg",
  • description: "A warm, soothing cappuccino with a touch of hazelnut to warm you as the weather turns."

Item 2:

  • name: "Chocolate Cake",
  • image: "images/choc-cake.jpg",
  • description: "Our chocolate cake is rich, moist, and dark. More chocolate to love."

Use the Data to Show the Features

Use your JSON data to build and add HTML to show the two featured items in the “featured-items” div. Create and add the HTML to the page using JavaScript. The code that you write should be able to add any number of featured items to the page.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published