Profile Lookup - need help

I cannot figure out why it’s only returning “no such contact” even thought before I wrote in the “else if’s” it would log correctly.

The for-loop is supposed to look at each of the contacts in the collection. It doesn’t make sense to immediately return 'No such contact' when it’s not even done iterating through your contact list.

Try putting that line after the for-loop.

I got it, thanks kevcomedia for your help. I realize now that return exits the function.