We are going to write a function called
openOrSenior that accepts a two-dimensional array,
data, as an argument.
The Western Suburbs Croquet Club has two categories of membership, Senior and Open. You are given an array and each element is an array containing two numbers. The first number is the age of the member. The second number is their handicap.
To be a senior, the member has to be at least 55 years old and have a handicap greater than 7.
After evaluating the two numbers from each array element, the goal of the function is to determine whether each member is an “Open” or “Senior” member. Output each person’s member status into a new array.