Mini-exercise

Write a function memberOf(person: Person, group: [Person]) -> Bool that will return true if person can be found inside group, and false if it can not.

Test it by creating two arrays of five Person objects for group and using john as the

person. Put john in one of the arrays, but not in the other.

results matching ""

    No results matching ""