Hat Shop explainer

The aim of this puzzle: Add a price attribute to the object, then print out the price by referencing that attribute.
Walkthrough of the solution: To solve this puzzle you’ll first need to add a new attribute within the hat object {}, and the attribute should be called price. You can add this the same way type is an attribute within the hat object {}. On the right side of the price colon :, you’ll need to put a number (i.e. a price for the hat). This means you can reference the price attribute of the hat object, and it will give you the number you just assigned. To finish the solution, you need to put this number into the print statement. You do this by replacing the string 'add something here' with hat.price.
Sample code solution:
(Tap below to reveal)

var hat = {
  type: 'baseball cap',
  price: 99
};
print  ('The ' + hat.type + ' costs $' + hat.price);

JavaScript Concepts: Binary Expression (+), Code Block (object), Calling Functions, Data Structures (object), Identifiers, Member Expression, Variable Declaration
Grasshopper Concepts: print()