Okay, so after looking at the answer I know I could have easily solved this with typeof, but because my memory is horrible, my original answer looked like this:
So why does my second solution work while my first doesn’t? Both should be making the comparison false === false and returning true, but only one works and the other doesn’t.
it is because you can’t compare one thing with two different ones, so when you have bool === (true || false) first the thing between parenthesis is evaluated, and it becomses true, so you have bool === true - if you want to do it with the OR operator you need to do two different comparisons: bool === true || bool === false