Giter VIP home page Giter VIP logo

object_challenge's Introduction

Pizza For The People Object Challenge

So, you just learned about objects and you're eager to put your knowledge to test! You are in luck!

You have been given the following data:

["IL", 7000000, 12]
["MN", 2500000, 3]
["IA", 674000, 1]
["WI", 6800000, 15]

This data represents the state, annual revenue per state, and number of locations in that state for a pizza chain, Pizza For The People.

BASE Mode

  1. Fork the repo for this project.
  2. Create an object constructor for each state (probably named something like State or Region). The object properties should include state, revenue, locationCount).
  3. Create an instance of each object using the provided data.
  4. Display this information on the DOM in a list element

HARD Mode

  1. Create a function (method), within the constructor, that calculates and returns the average revenue. Name this function averageRevenue.
  2. Use this method to display on the DOM the average amount of revenue per location for each state. This amount can be shown in the same list as above or in some other way.

object_challenge's People

Contributors

kdszafranski avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.