Everything Be True - corner case logic issue

I think perhaps there is a small logic issue in the suggested solutions - it doesn’t properly check boolean properties

E.g. when onBoat == false, I think this should be truthy

However, each solution basically considers any valid boolean value of ‘false’ to be not truthy.

??? Not sure what you are referring to.

For example:

truthCheck([{“name”: “Pete”, “onBoat”: false}, {“name”: “Repeat”, “onBoat”: false}, {“name”: “FastFoward”, “onBoat”: false}], “onBoat”)

I would expect this to return TRUE, but because onBoat is assigned the value of FALSE, it returns False. I hope I’m being clear!

Yes, because the instructions say "Check if the predicate (second argument) is truthy on all elements of a collection (first argument).

The key word is all, so if all of the objects’ onBoat properties must have truthy values, then your function should return true, otherwise return false. In the example you posted above, one of the objects {“name”: “FastFoward”, “onBoat”: false} has an onBoat property with the falsy value (false), so your function should return false.

Got it - I took truthy to mean that the object both has the property, and the value is valid (different from the value being false). Guess I just didn’t quite understand what the criteria for “truthy” is!

If you go back to the Falsy Bouncer challenge, you learned their are only 6 falsy values. Everything else is a truthy value.

Goldfish memory here! Thanks, Randell! You rock!