Tell us what’s happening:
**Your code so far**
function isEveryoneHere(obj) {
// Only change code below this line
for(let i=0;i<obj.length;i++)
{
if(obj.hasOwnProperty(obj[i]))
return true;
}
// Only change code above this line
return false;
}
console.log(isEveryoneHere(users));
In this function I have written code of using iterations in users obj for false values it showing correct values but for checking values in it is showing incorrect results? Any suggestions?
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
.
Challenge: Check if an Object has a Property
Link to the challenge: