By using the == operator, instead of the === operator, I don’t believe that I was making a direct comparison with the true boolean value. Especially since when the number 1 is passed into the functions that utilize value == true, it outputs true, which means that the functions found 1 == true to be a true statement, as expected.
Thank you for taking the time to answer my questions. I had to do some additional research but found the answer in this article:
This is why the functions that utilize value == true returned false when the input parameter is ‘hello’, because ‘hello’ is a string without numeric value, so it is always returning NaN == true, which is false.
So using the == operator in the functions, 0 == true is is evaluated as false, ’ ’ == true is evaluated as false, 1 == true is evaluated as true, and ‘anyNon-numericString’ converts to NaN == true which is false.
I didn’t know about the strange conversions that happen behind the scenes when the == operator is utilized.