In JavaScript, the plain object does the everyday work of Python’s dict, all the way to JSON, and a Set does the work of a set. Your project is to port the label script for Marta’s notebook shop.
Here’s a first taste, with order 1042’s insured value. Iris chose no cover, so the value is 0.
This Python code reads it with .get() and a default of 50, which is only for orders without
the key:
order = {"id": 1042, "insured_value": 0}
insured = order.get("insured_value", 50)
print(f"Insured value: £{insured}")
Python keeps the 0:
Insured value: £0