Code is wrong, still passes, how? --- Check if an Object has a Property

return true;
return false;

while checks whether some condition is true. What you’ve got is essentially the same as using if.

But I checked for Alan only and not the other users, how is this test passing then?

Ah, I see what you’re saying. Seems like the test could use some tweaking. Put up an issue and be a contributor!

1 Like