标签:not sea turn out logs ges this can outside
You can’t say that you didn’t find a person until you have searehd through the entire contacts array — which would mean the loop has ended and the firstName has not been found in the array. This: return "No such contact"; should be outside of the loop.
标签:not sea turn out logs ges this can outside
原文地址:http://www.cnblogs.com/Willy-Jane/p/6985617.html