Well, I’m using if else if statement to run through each .hasOwnProperty conditions. If the prop exist in the users, it will return true.
Since other prop’s name outside of these 4 properties should return false, outside of these condition is pretty much the -else- statement to return false.
And it’s still wrong.
I did test with console.log(isEveryoneHere('James) and the console gives false log. Still the tests do not accept it.
ah, it will still return as true because my if statements only require 1 of the 4 users to be online when I need all four of them to be online at the same time.
So that means I have to write all four userObj into one if statement using &&…can you do thise? (‘Alan’, ‘Jeff’, ‘Sarah’, ‘Ryan’)?
Yah, the later didn’t work. But I figured it out now thankyou.
I’d like to tell you something off topic. I’ve been getting error page on this forum page using Chrome lately. The page load up, but cannot click or type anything.
But it’s completely fine on firefox.
I did delete all cookies and reset history on Chrome and it was fixed for like a day, now it’s having a problem again.