The challenge says
If
name
does not correspond to any contacts then return"No such contact"
.
Why isn’t this incorrect?
if (contacts[i].hasOwnProperty(firstName) === false){
value = "No such contact";
}
if I’m not mistaking what the above code does is: It checks if contacts
has the property firstName
NOT if the name corresponds to any of the contacts
Please I need clarification.