Read the booking fields
Read each property from the object that contains it.
your task
Print the guest, the status in parentheses, and the room name. The first case must print “Mira (held) in Atlas”.
The report prints the guest’s name, but the status and room name both show undefined. Inspect the booking in each case. Property names are case-sensitive.
Run code runs your code once for each case. It compares what your code prints with the expected output.
Starter code
or press Ctrl EnterNot run yet
cases
Not run yetA held booking
Expected output
1
Mira (held) in AtlasSee the input and the code for this case
const booking = { guest: "Mira", status: "held", room: { name: "Atlas", floor: 2 } };Not run yetA confirmed booking
Expected output
1
Jonas (confirmed) in BirchSee the input and the code for this case
const booking = { guest: "Jonas", status: "confirmed", room: { name: "Birch", floor: 1 } };