Codington
0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Workshop Registration Summary

A workshop registration arrived as nested data. Turn it into a readable summary.

Your task

Write printRegistration(registration) with a destructured parameter. Extract the attendee's firstName and city, both session names, and level with a default of beginner. Display the attendee, sessions, and level on three lines. Then destructure meal from the nested preferences and display it after the function call.

Hint

Sketch the shape of registration before writing the parameter pattern.