Exercises
The following are the exercises and questions for this chapter:
What does the following JavaScript code define? What else is similar to it?
var hospital = { name: "St Stephen's Hospital", location: "Kensington & Chelsea", patients: 1250, doctors: ['Patel', 'Radeksky', 'Brown', 'Shockley'] };From the preceding code, explain what is the main difference between the
hospital.patientsandhospital['patients']property accessors?Write a JavaScript object that constructs a participant to a Java User Group member. Let's say you call your object
JUGParticipant. You will need to capture their first and last names, their telephone contact numbers, their e-mail addresses (optional), and also their specific interests (optional).Modify
JUGParticipantto accept the interests as another object. Write a JavaScript Tag object so that you build an array of skills such as Java EE, Android, or HTML. Demonstrate that you can build this object graph of theJUGParticipantsand Tag objects.Adapt...