NaN === NaN is
NaN check, equivalent to
You’re right, it seems like the following code checking for self-equality should always return
Indeed, I wrote about checking for NaN in Coding in Simple English:
ES6 (ECMAScript 2015) added a helper function called Object.is() that is slightly different from the === operator.
Thanks again for sharing your response and helping me clarify this point!