chapter 11 answers

You could check the length of the array rather than checking that each element is defined.