anyway, how do you check if an object has a certain property?
because doing users in users is not the way.
review previous challenges if you don’t remember
I meant like this if ("Alan" in obj && "Jeff" in obj && "Sarah" in obj && "Ryan" in obj) then return true, and after that you put else statement that returns false.
function isEveryoneHere(obj) {
// Only change code below this line
if ( "Alan" in obj && "Jeff" in obj && "Sarah" in obj && "Ryan" in obj in obj==true) {
return true;
}else{
return false
}
}
console.log(isEveryoneHere(users));
remove in obj==true from here: ( "Alan" in obj && "Jeff" in obj && "Sarah" in obj && "Ryan" in obj in obj==true). If statement will automatically return true if everything checks out.