---
title: "Meaning & Key Takeaway of: NaN never equals any other value…"
description: "\"“NaN never equals any other value, including itself, so to test for NaN use the function isNaN.”\" — Eric Freeman"
image: "https://sms4smile.com/quotes/i/6bc/eric-freeman-7573_equals_nan-never-equals-any-other-value-includi_753508.jpg"
---

#  NaN never equals any other value, including itself, so to…

![“NaN never equals any other value, including itself, so to test for NaN use the function isNaN.” quote by Eric Freeman](https://sms4smile.com/quotes/i/6bc/eric-freeman-7573_equals_nan-never-equals-any-other-value-includi_753508.jpg)   [Download](https://sms4smile.com/quotes/i/6bc/eric-freeman-7573_equals_nan-never-equals-any-other-value-includi_753508.jpg) [Open image](https://sms4smile.com/quotes/i/6bc/eric-freeman-7573_equals_nan-never-equals-any-other-value-includi_753508.jpg)

> ““NaN never equals any other value, including itself, so to test for NaN use the function isNaN.””

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

NaN is a unique value that never equals anything, even itself; use isNaN to detect it.

**In simple terms:** NaN never equals itself.

Key Takeaway

Use isNaN for detection.

Themes

programming logic errors data validation

Mood

technical analytical

Type

instructional technical

When to use this quote

- debugging
- data processing
- numeric calculations

Key Concepts

computer science mathematics software engineering

Questions to Reflect On

- How do you handle unexpected NaN in data?
- What alternatives exist to detect invalid numbers?

A Different Perspective

NaN can propagate unnoticed errors.

★ ★ ★ ★ ★   No ratings yet

## Related quotes

> [I have a treasure trove of Baker memories, all of which reinforce my sense of Howard Baker as one of the most decent people…](https://sms4smile.com/quotes/john-yarmuth/i-have-a-treasure-trove-of-baker-memories-all-of-which-reinforce-my/)

[John Yarmuth](https://sms4smile.com/quotes/author/john-yarmuth/)

> [One mysterious person looking at another mysterious person equals what? Another mystery.](https://sms4smile.com/quotes/charlotte-rampling/one-mysterious-person-looking-at-another-mysterious-person-equals/)

[Charlotte Rampling](https://sms4smile.com/quotes/author/charlotte-rampling/)

> [There is no peace among equals because equality doesn't exist in this universe. Either one prevails and the other follows, or both negotiate their…](https://sms4smile.com/quotes/harold-j-duarte-bernhardt/there-is-no-peace-among-equals-because-equality-doesn-t-exist-in-this/)

[Harold J Duarte-Bernhardt](https://sms4smile.com/quotes/author/harold-j-duarte-bernhardt/)

> [Everything about the Olympics was first class, and women were treated as athletes and equals.](https://sms4smile.com/quotes/elizabeth-robinson-schwartz/everything-about-the-olympics-was-first-class-and-women-were-treated/)

Elizabeth Robinson Schwartz

> [Loads of computer graphics equals a terrible video in my book.](https://sms4smile.com/quotes/dan-hawkins/loads-of-computer-graphics-equals-a-terrible-video-in-my-book/)

[Dan Hawkins](https://sms4smile.com/quotes/author/dan-hawkins/)

> [With Kindness 1+1 always equals more than 2](https://sms4smile.com/quotes/brian-williams/with-kindness-1-1-always-equals-more-than-2/)

[Brian Williams](https://sms4smile.com/quotes/author/brian-williams/)

> [I rise in support of a Canada in which liberties are safeguarded, rights are protected and the people of this land are treated as…](https://sms4smile.com/quotes/paul-martin/i-rise-in-support-of-a-canada-in-which-liberties-are-safeguarded/)

[Paul Martin](https://sms4smile.com/quotes/author/paul-martin/)

> [I treat everyone as equals. I can't work if I'm not having fun, and I can't have fun if not everyone is happy.](https://sms4smile.com/quotes/stellan-skarsgard/i-treat-everyone-as-equals-i-can-t-work-if-i-m-not-having-fun-and-i/)

[Stellan Skarsgard](https://sms4smile.com/quotes/author/stellan-skarsgard/)

> [“It is more desirable for Entities to have equals() and hashCode() methods that are based on the object’s unique identity rather than other attributes.”](https://sms4smile.com/quotes/vaughn-vernon/it-is-more-desirable-for-entities-to-have-equals-and-hashcode-methods/)

[Vaughn Vernon](https://sms4smile.com/quotes/author/vaughn-vernon/)

> [“Life = Risk. If you haven't failed, you have lived.”](https://sms4smile.com/quotes/peiri-ann/life-risk-if-you-haven-t-failed-you-have-lived/)

Peiri Ann

> [Each Day I Meet Someone New, But Never Find Another YOU, The World Is Full Of People Its True, Yet No one Ever Equals…](https://sms4smile.com/quotes/ali-bassam/each-day-i-meet-someone-new-but-never-find-another-you-the-world-is/)

[Ali Bassam](https://sms4smile.com/quotes/author/ali-bassam/)

> [One plus one equals both.](https://sms4smile.com/quotes/gregory-maguire/one-plus-one-equals-both/)

[Gregory Maguire](https://sms4smile.com/quotes/author/gregory-maguire/)

> [You must talk to us as equals, or not talk to us at all.](https://sms4smile.com/quotes/david-ben-gurion/you-must-talk-to-us-as-equals-or-not-talk-to-us-at-all/)

[David Ben-Gurion](https://sms4smile.com/quotes/author/david-ben-gurion/)

> [Equals make the best friends.](https://sms4smile.com/quotes/aesop/equals-make-the-best-friends/)

[Aesop](https://sms4smile.com/quotes/author/aesop/)

> [I am not married yet, but I think ultimately in a good marriage it is the relationship which is the most important thing. It…](https://sms4smile.com/quotes/lawrence-bender/i-am-not-married-yet-but-i-think-ultimately-in-a-good-marriage-it-is/)

[Lawrence Bender](https://sms4smile.com/quotes/author/lawrence-bender/)

## More by Eric Freeman

> [“When you delete a property, you’re not just deleting the value of the property, you’re deleting the property itself. And, if you try to…](https://sms4smile.com/quotes/eric-freeman/when-you-delete-a-property-you-re-not-just-deleting-the-value-of-the/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“the constructor always has a prototype property. More”](https://sms4smile.com/quotes/eric-freeman/the-constructor-always-has-a-prototype-property-more/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“when you assign a value to a variable name that hasn’t been previously declared, it is treated as a new, global variable. So be…](https://sms4smile.com/quotes/eric-freeman/when-you-assign-a-value-to-a-variable-name-that-hasn-t-been/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“Web Workers have a global function named importScripts that you can use to import one or more JavaScript files into your worker. To”](https://sms4smile.com/quotes/eric-freeman/web-workers-have-a-global-function-named-importscripts-that-you-can/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“If the two values have different types, try to convert them into the same type and then compare them”](https://sms4smile.com/quotes/eric-freeman/if-the-two-values-have-different-types-try-to-convert-them-into-the/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“Well, it’s a browser policy, and it says you can’t retrieve data from a domain that is different from the domain the page itself…](https://sms4smile.com/quotes/eric-freeman/well-it-s-a-browser-policy-and-it-says-you-can-t-retrieve-data-from-a/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“Math is not a constructor, or even a function. It’s an object. As you know, Math is a built-in object that you can use…](https://sms4smile.com/quotes/eric-freeman/math-is-not-a-constructor-or-even-a-function-it-s-an-object-as-you/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“When you pass zero to setTimeout, you’re asking JavaScript to run your timeout handler as soon as it possibly can — and this leads…](https://sms4smile.com/quotes/eric-freeman/when-you-pass-zero-to-settimeout-you-re-asking-javascript-to-run-your/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“JavaScript doesn’t have a character type. So characters are returned as new strings containing one character.”](https://sms4smile.com/quotes/eric-freeman/javascript-doesn-t-have-a-character-type-so-characters-are-returned/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“Closures are often used to capture state for event handlers.”](https://sms4smile.com/quotes/eric-freeman/closures-are-often-used-to-capture-state-for-event-handlers/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“Lexical scope means that we can determine the scope of a variable by reading our code.”](https://sms4smile.com/quotes/eric-freeman/lexical-scope-means-that-we-can-determine-the-scope-of-a-variable-by/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“Q: Q: You said getElementsByTagName returns a list. Do you mean an array? A: A: It returns an object that you can treat like…](https://sms4smile.com/quotes/eric-freeman/q-q-you-said-getelementsbytagname-returns-a-list-do-you-mean-an-array/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“the truth is JavaScript actually makes two passes over your page: in the first pass it reads all the function definitions, and in the…](https://sms4smile.com/quotes/eric-freeman/the-truth-is-javascript-actually-makes-two-passes-over-your-page-in/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“If you change any property in the prototype, it affects all the objects that inherit from that prototype, unless that object has overridden that…](https://sms4smile.com/quotes/eric-freeman/if-you-change-any-property-in-the-prototype-it-affects-all-the/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“methods in objects are properties too. They just happen to have a function assigned to them.”](https://sms4smile.com/quotes/eric-freeman/methods-in-objects-are-properties-too-they-just-happen-to-have-a/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

[Explore all 90 Eric Freeman quotes ](https://sms4smile.com/quotes/author/eric-freeman/)

## More Equals quotes

> [I have a treasure trove of Baker memories, all of which reinforce my sense of Howard Baker as one of the most decent people…](https://sms4smile.com/quotes/john-yarmuth/i-have-a-treasure-trove-of-baker-memories-all-of-which-reinforce-my/)

[John Yarmuth](https://sms4smile.com/quotes/author/john-yarmuth/)

> [Equals make the best friends.](https://sms4smile.com/quotes/aesop/equals-make-the-best-friends/)

[Aesop](https://sms4smile.com/quotes/author/aesop/)

> [You must talk to us as equals, or not talk to us at all.](https://sms4smile.com/quotes/david-ben-gurion/you-must-talk-to-us-as-equals-or-not-talk-to-us-at-all/)

[David Ben-Gurion](https://sms4smile.com/quotes/author/david-ben-gurion/)

> [One plus one equals both.](https://sms4smile.com/quotes/gregory-maguire/one-plus-one-equals-both/)

[Gregory Maguire](https://sms4smile.com/quotes/author/gregory-maguire/)

> [Each Day I Meet Someone New, But Never Find Another YOU, The World Is Full Of People Its True, Yet No one Ever Equals…](https://sms4smile.com/quotes/ali-bassam/each-day-i-meet-someone-new-but-never-find-another-you-the-world-is/)

[Ali Bassam](https://sms4smile.com/quotes/author/ali-bassam/)

> [“Life = Risk. If you haven't failed, you have lived.”](https://sms4smile.com/quotes/peiri-ann/life-risk-if-you-haven-t-failed-you-have-lived/)

Peiri Ann

> [“It is more desirable for Entities to have equals() and hashCode() methods that are based on the object’s unique identity rather than other attributes.”](https://sms4smile.com/quotes/vaughn-vernon/it-is-more-desirable-for-entities-to-have-equals-and-hashcode-methods/)

[Vaughn Vernon](https://sms4smile.com/quotes/author/vaughn-vernon/)

> [I treat everyone as equals. I can't work if I'm not having fun, and I can't have fun if not everyone is happy.](https://sms4smile.com/quotes/stellan-skarsgard/i-treat-everyone-as-equals-i-can-t-work-if-i-m-not-having-fun-and-i/)

[Stellan Skarsgard](https://sms4smile.com/quotes/author/stellan-skarsgard/)

> [I rise in support of a Canada in which liberties are safeguarded, rights are protected and the people of this land are treated as…](https://sms4smile.com/quotes/paul-martin/i-rise-in-support-of-a-canada-in-which-liberties-are-safeguarded/)

[Paul Martin](https://sms4smile.com/quotes/author/paul-martin/)

> [With Kindness 1+1 always equals more than 2](https://sms4smile.com/quotes/brian-williams/with-kindness-1-1-always-equals-more-than-2/)

[Brian Williams](https://sms4smile.com/quotes/author/brian-williams/)

> [Loads of computer graphics equals a terrible video in my book.](https://sms4smile.com/quotes/dan-hawkins/loads-of-computer-graphics-equals-a-terrible-video-in-my-book/)

[Dan Hawkins](https://sms4smile.com/quotes/author/dan-hawkins/)

> [Everything about the Olympics was first class, and women were treated as athletes and equals.](https://sms4smile.com/quotes/elizabeth-robinson-schwartz/everything-about-the-olympics-was-first-class-and-women-were-treated/)

Elizabeth Robinson Schwartz

> [There is no peace among equals because equality doesn't exist in this universe. Either one prevails and the other follows, or both negotiate their…](https://sms4smile.com/quotes/harold-j-duarte-bernhardt/there-is-no-peace-among-equals-because-equality-doesn-t-exist-in-this/)

[Harold J Duarte-Bernhardt](https://sms4smile.com/quotes/author/harold-j-duarte-bernhardt/)

> [One mysterious person looking at another mysterious person equals what? Another mystery.](https://sms4smile.com/quotes/charlotte-rampling/one-mysterious-person-looking-at-another-mysterious-person-equals/)

[Charlotte Rampling](https://sms4smile.com/quotes/author/charlotte-rampling/)

> [I am not married yet, but I think ultimately in a good marriage it is the relationship which is the most important thing. It…](https://sms4smile.com/quotes/lawrence-bender/i-am-not-married-yet-but-i-think-ultimately-in-a-good-marriage-it-is/)

[Lawrence Bender](https://sms4smile.com/quotes/author/lawrence-bender/)

Browse all 138 Equals quotes

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "“NaN never equals any other value, including itself, so to test for NaN use the function isNaN.”",
            "creator": {
                "@type": "Person",
                "name": "Eric Freeman"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/eric-freeman/nan-never-equals-any-other-value-including-itself-so-to-test-for-nan/",
            "about": {
                "@type": "Thing",
                "name": "Equals"
            },
            "@id": "https://sms4smile.com/quotes/eric-freeman/nan-never-equals-any-other-value-including-itself-so-to-test-for-nan/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/6bc/eric-freeman-7573_equals_nan-never-equals-any-other-value-includi_753508.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/6bc/eric-freeman-7573_equals_nan-never-equals-any-other-value-includi_753508.jpg",
                "url": "https://sms4smile.com/quotes/i/6bc/eric-freeman-7573_equals_nan-never-equals-any-other-value-includi_753508.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“NaN never equals any other value, including itself, so to test for NaN use the function isNaN.” — Eric Freeman",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Eric Freeman",
                    "item": "https://sms4smile.com/quotes/author/eric-freeman/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "“NaN never equals any other value,...",
                    "item": "https://sms4smile.com/quotes/eric-freeman/nan-never-equals-any-other-value-including-itself-so-to-test-for-nan/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/eric-freeman/nan-never-equals-any-other-value-including-itself-so-to-test-for-nan/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
