首页 > 代码库 > fcc——有关循环的问题

fcc——有关循环的问题

 

技术分享

 

 

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.

技术分享

 

fcc——有关循环的问题