undefined
adjective
  1. Lacking a definition or value
  2. (mathematics) That does not have a meaning and is thus not assigned an interpretation
from Wiktionary, Creative Commons Attribution/Share-Alike License. More at Wordnik
🌐
Merriam-Webster
merriam-webster.com › dictionary › undefined
UNDEFINED Definition & Meaning - Merriam-Webster
4 weeks ago - The meaning of UNDEFINED is not defined. How to use undefined in a sentence.
🌐
Dictionary.com
dictionary.com › browse › undefined
UNDEFINED Definition & Meaning | Dictionary.com
5 days ago - UNDEFINED definition: without fixed limits; indefinite in form, extent, or application. See examples of undefined used in a sentence.
Discussions

JavaScript: undefined !== undefined? - Stack Overflow
NOTE: As per ECMAScript5.1, section 15.1.1.3, window.undefined is read-only. Modern browsers implement this correctly. for example: Safari 5.1, Firefox 7, Chrome 20, etc. Undefined is still changea... More on stackoverflow.com
🌐 stackoverflow.com
Definition of "undefined"
"Undefined" literally means that it has no definition, and therefore no meaning. It is an adjective. The expression 1 ÷ 0 is simply meaningless. It does not make sense to write "1 ÷ 0 = undefined" as if "undefined" is some value that 1 ÷ 0 is equal to. More on reddit.com
🌐 r/learnmath
6
2
May 7, 2014
JavaScript checking for null vs. undefined and difference between == and === - Stack Overflow
How do I check a variable if it's null or undefined and what is the difference between the null and undefined? What is the difference between == and === (it's hard to search Google for "===" )? More on stackoverflow.com
🌐 stackoverflow.com
What is "undefined"?
"Undefined" isn't a mathematical value. It just means the thing you're trying to work with isn't defined. This is rather like how "nobody's perfect" doesn't mean there is a perfect person out there going by the name Nobody. It means there is no such person. More on reddit.com
🌐 r/math
36
3
May 2, 2018
🌐
Wikipedia
en.wikipedia.org › wiki › Undefined_(mathematics)
Undefined (mathematics) - Wikipedia
November 4, 2025 - In mathematics, the term undefined refers to a value, function, or other expression that cannot be assigned a meaning within a specific formal system. Attempting to assign or use an undefined value within a particular formal system, may produce contradictory or meaningless results within that ...

mathematical concept which does not have meaning and so which is not assigned an interpretation

In mathematics, the term undefined refers to a value, function, or other expression that cannot be assigned a meaning within a specific formal system. Attempting to assign or use an undefined value … Wikipedia
Find elsewhere
🌐
Undefined Inc
undefinedco.com
Democratizing Beauty via Clean-ical Multitaskers – Undefined Inc
Beauty shouldn't be illusive or exclusive- let's democratize it!
🌐
Instagram
instagram.com › undefined_ba
undefined (@undefined_ba) • Instagram photos and videos
149K Followers, 191 Following, 161 Posts - undefined (@undefined_ba) on Instagram: "new items en web🦇🕷️🌙❤️‍🩹"
🌐
Reddit
reddit.com › r/learnmath › definition of "undefined"
r/learnmath on Reddit: Definition of "undefined"
May 7, 2014 -

Probably a trivial question, but it's been bugging me lately.

Most of us learn in school that 1÷0 is "undefined", but usually the teacher doesn't go much further than that. I've taken it to mean that dividing by zero is an operation that is not defined in standard mathematics, i.e. the answer to 1÷0 is not defined. However, I've seen people (both students and teachers) talk about "undefined" as though it's a mathmatecal term in of itself. Is this proper usage of the term, or does it simply mean that something is not defined?

tl;dr -- When discussing division by zero, is "undefined" a noun or an adjetive?

🌐
Cambridge Dictionary
dictionary.cambridge.org › us › dictionary › english › undefined
UNDEFINED | definition in the Cambridge English Dictionary
October 8, 2025 - UNDEFINED meaning: 1. not clearly described, stated, or known: 2. not having been given a definition (= a statement…. Learn more.
🌐
Etymonline
etymonline.com › word › undefined
Undefined - Etymology, Origin & Meaning
Originating in the 1610s from un- + past participle of define, the word means not described by definition, unclear, or indefinite.
🌐
TypeScript
typescriptlang.org › docs › handbook › 2 › everyday-types.html
TypeScript: Documentation - Everyday Types
JavaScript has two primitive values used to signal absent or uninitialized value: null and undefined.
🌐
Wish
wish.org
Unwrap the power of a wish today.
Together, we create life-changing wishes for children with critical illnesses – but you can make a child's wish possible. When you donate, you're giving children renewed strength to fight their illnesses, bringing families closer together and uniting entire communities.
🌐
Instagram
instagram.com › undefined.col
Undefined (@undefined.col) • Instagram photos and videos
2,939 Followers, 3 Following, 42 Posts - Undefined (@undefined.col) on Instagram: "An expression of self. To know no bounds. BLACK FRIDAY EVENT TILL 12/5 @undefined.trainingdivision"
🌐
The Rust Reference
doc.rust-lang.org › reference › behavior-considered-undefined.html
Behavior considered undefined - The Rust Reference
Undefined behavior affects the entire program. For example, calling a function in C that exhibits undefined behavior of C means your entire program contains undefined behaviour that can also affect the Rust code.
Top answer
1 of 9
983

How do I check a variable if it's null or undefined...

Is the variable null:

if (a === null)
// or
if (a == null) // but see note below

...but note the latter will also be true if a is undefined.

Is it undefined:

if (typeof a === "undefined")
// or
if (a === undefined)
// or
if (a == undefined) // but see note below

...but again, note that the last one is vague; it will also be true if a is null.

Now, despite the above, the usual way to check for those is to use the fact that they're falsey:

if (!a) {
    // `a` is falsey, which includes `undefined` and `null`
    // (and `""`, and `0`, and `NaN`, and [of course] `false`)
}

This is defined by ToBoolean in the spec.

...and what is the difference between the null and undefined?

They're both values usually used to indicate the absence of something. undefined is the more generic one, used as the default value of variables until they're assigned some other value, as the value of function arguments that weren't provided when the function was called, and as the value you get when you ask an object for a property it doesn't have. But it can also be explicitly used in all of those situations. (There's a difference between an object not having a property, and having the property with the value undefined; there's a difference between calling a function with the value undefined for an argument, and leaving that argument off entirely.)

null is slightly more specific than undefined: It's a blank object reference. JavaScript is loosely typed, of course, but not all of the things JavaScript interacts with are loosely typed. If an API like the DOM in browsers needs an object reference that's blank, we use null, not undefined. And similarly, the DOM's getElementById operation returns an object reference — either a valid one (if it found the DOM element), or null (if it didn't).

Interestingly (or not), they're their own types. Which is to say, null is the only value in the Null type, and undefined is the only value in the Undefined type.

What is the difference between "==" and "==="

The only difference between them is that == will do type coercion to try to get the values to match, and === won't. So for instance "1" == 1 is true, because "1" coerces to 1. But "1" === 1 is false, because the types don't match. ("1" !== 1 is true.) The first (real) step of === is "Are the types of the operands the same?" and if the answer is "no", the result is false. If the types are the same, it does exactly what == does.

Type coercion uses quite complex rules and can have surprising results (for instance, "" == 0 is true).

More in the spec:

  • Abstract Equality Comparison (==, also called "loose" equality)
  • Strict Equality Comparison (===)
2 of 9
99

The difference is subtle.

In JavaScript an undefined variable is a variable that as never been declared, or never assigned a value. Let's say you declare var a; for instance, then a will be undefined, because it was never assigned any value.

But if you then assign a = null; then a will now be null. In JavaScript null is an object (try typeof null in a JavaScript console if you don't believe me), which means that null is a value (in fact even undefined is a value).

Example:

var a;
typeof a;     # => "undefined"

a = null;
typeof null;  # => "object"

This can prove useful in function arguments. You may want to have a default value, but consider null to be acceptable. In which case you may do:

function doSomething(first, second, optional) {
    if (typeof optional === "undefined") {
        optional = "three";
    }
    // do something
}

If you omit the optional parameter doSomething(1, 2) thenoptional will be the "three" string but if you pass doSomething(1, 2, null) then optional will be null.

As for the equal == and strictly equal === comparators, the first one is weakly type, while strictly equal also checks for the type of values. That means that 0 == "0" will return true; while 0 === "0" will return false, because a number is not a string.

You may use those operators to check between undefined an null. For example:

null === null            # => true
undefined === undefined  # => true
undefined === null       # => false
undefined == null        # => true

The last case is interesting, because it allows you to check if a variable is either undefined or null and nothing else:

function test(val) {
    return val == null;
}
test(null);       # => true
test(undefined);  # => true
🌐
Wiktionary
en.wiktionary.org › wiki › undefined
undefined - Wiktionary, the free dictionary
(lacking a definition or value): indefinite, undefinable; see also Thesaurus:indistinct or Thesaurus:vague
🌐
Quora
quora.com › What-does-undefined-mean-in-math-Where-is-it-often-used
What does 'undefined' mean in math? Where is it often used? - Quora
Answer (1 of 4): Operations on certain numbers are "undefined" because a value doesn't exist for it. Taken another way, there isn't any feasible way of defining them without "breaking" or discarding other laws of mathematics so we say it is ...
🌐
Weblio
ejje.weblio.jp › weblio 辞書 › 英和辞典・和英辞典 › ハイパー英語辞書 › undefinedの意味・解説
undefined - Weblio 英和・和英辞典
We slid into our office, past two women discussing the "X factor," an apparently undefined quality their firm felt they lacked.