NaNThe global NaN property is a value representing Not-A-Number. In other words, it is a variable in global scope. Even when this is not the case, avoid overriding it. Testing against Nan stevens tell if a value is NaN, use Number.
Additionally, some array methods cannot find NaN, while others can. For more information about NaN and its comparison, see Equality comparison and sameness. Found a content problem with this page? This page was last modified on Dec 13, 2022 by MDN contributors. Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation. Content available under a Creative Commons license. On this Wikipedia the language links are at the top of the page across from the article title.