5. Finding that Special Someone


as you can see something is (again) veeery wrong:
a. i'm passing an argument that should not return anything;
b. it's returning all the elements of array;
c. and the interface sais... OK - gud work! ... :frowning:


...aaand after a small change the output is reduced to one line output (still not ok) but the interface it's still happy about it...


I'm not sure if this is what is causing the problem, but what is the:

i = i + 1

towards the end?

Another thing I noticed is, in the if/else statement you'll want it to read:

if(contacts[i].lastName === lastName)

Last thing, try removing the "else" altogether since it's unnecessary.

I could be wrong on these, but this is what's worked for me so far.

Good luck! Hope that helped at all.