Skip to content
engineering workbench.by StudyPort Academy
All glossary terms

GLOSSARY · A WORD, UNPACKED

undefined

the value JavaScript automatically gives to something that's been declared but not yet assigned.

A little more detail

For example, let count; initializes count to undefined when that declaration executes. Missing object properties and a function that returns no value also commonly produce undefined. This is different from reading let or const before initialization, which throws, and from reading an undeclared name, which normally throws too. Use the distinction to investigate where a required value went missing.

See it in practice

These lessons pair the idea with examples you can change and run.