Outline

Here is the second exercise for this section:

// 1. Log the keys of the following object as an array
const pizza = {
  name: 'pepperoni',
  price: 8,
  toppings: ['marinara', 'cheese', 'pepperoni']
}

// 2. Loop over the above keys and print the keys to the console in all caps

// 3. Convert the above object to a string, stored in a variable, and print it to the console with all the keys and spacing set to 3

// 4. Convert the above object to a string but remove the price of the pizza and spacing set to 2

// 5. Take the string representation of the pizza object from 3 or 4 and convert it back to an object. Print the object to the console.

You can also fork this exercise from StackBlitz by clicking here.

 

I finished! On to the next chapter