Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 823 Bytes

File metadata and controls

11 lines (6 loc) · 823 Bytes

EXERCISE THREE: Looping With Objects!

NOTE: Be sure to use your built-in object methods and the for...in loops we covered in the curriculum videos.

  1. Note the structure of the pizzaPlace object. Pay attention to the data types and structure.

  2. Write a function, printPizzaPlace. It should iterate over every key-value pair in the object and print them in pairs.

  3. Write a function, toppingsPriceRange, that iterates over the nested pizzaToppings object and returns the highest and lowest topping prices in a two-element array. DO NOT assume the prices or number of toppings are fixed for any pizzaPlace.

  4. Write a function, calculateAverageRating, that intakes a pizzaPlace object and returns the average number of stars from the star reviews it has received from users.