1. Create a new visitor
- Revisit the concept "Objects" to find out how to create an object with certain keys and values.
2. Revoke the ticket
- Use the assignment operator
=to set the
ticketIdproperty of the visitor object to
- Return the visitor object afterwards.
3. Determine the ticket status
- Revisit the concept "Conditionals" to find out how conditionally return different values from the function.
- Use the bracket notation to access the value of the given
ticketIdin the object.
- Use the strict equality operator
===to check for
4. Improve the ticket status response
- Retrieve the value for a given
ticketIdwith bracket notation like in the previous task.
- No if-statement is needed to solve this task.
- Use the nullish coalescing operator