Create product with name "Parle-G", price 10 and inStock true. The price went up: change price to 12. Add a new key category with "Biscuits". Print Parle-G costs ₹12 using the object’s values.
Try twice to unlock the solution (0/2)
script.jsCtrl ⏎
Console
Output from console.log appears here.
Checklist
Press Run to check your code.
○
product has name “Parle-G” and inStock true
○
price is now 12
○
category is “Biscuits”
○
The console shows “Parle-G costs ₹12”
Lesson notes (text version)
1. Keys and values
An object groups related values under names (called keys):
Create product with name "Parle-G", price 10 and inStock true. The price went up: change price to 12. Add a new key category with "Biscuits". Print Parle-G costs ₹12 using the object’s values.