1. Glossary
  2. Undefined

Undefined

undefined is a primitive value automatically assigned to variables that have just been declared, or to formal arguments for which there are no actual arguments.

Example

js
let x; // create a variable but assign it no value
console.log(`x's value is ${x}`); // logs "x's value is undefined"

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /