why not let me use && instead of having to nest IF?
it should have to work, I don’t see why and I’ve already tried every possible way and it gives an error for that topic.
if (contacts[i].firstName === name) {
if (contacts[i].hasOwnProperty(prop) === true) {
return contacts[i][prop];
if (contacts[i].firstName == name && contacts[i].hasOwnProperty(prop) ===true) {
return contacts[i][prop]; }
why are these 2 not the same?
**Información de tu navegador:**
El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36
Desafío: Búsqueda de perfiles
Enlaza al desafío: