function makeChoice_(attendee, activitiesById) {
  for (let i = 0; i < attendee.preferences.length; ++i) {
    let activity = activitiesById[attendee.preferences[i]];
    if (!activity) {
      continue;
    }
    let canJoin = checkAvailability_(attendee, activity);
    if (canJoin) {
      attendee.assigned.push(activity);
      activity.roster.push(attendee);
      break;
    }
  }
}
Attempts to assign an activity for an attendee based on their preferences and current schedule.

@param {object} attendee - Attendee looking to join an activity
@param {object} activitiesById - Map of all available activities