1. 程式人生 > >fcc——有關循環的問題

fcc——有關循環的問題

mage oop person ould loop ide fin png you

技術分享

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——有關循環的問題