You might mean it shouldn't work? but alas it does (because of 'lopsided equality tables'). Try the following: open the console of your browser, type the following:
true == 1 === true
and press enter - tada! You can also check out this SO answer if you are sufficiently flabbergasted: https://stackoverflow.com/a/12236341