Null

“Null” represents the absence of a value or the presence of invalid objects in computer science and web development. It indicates when a variable or object contains no data or if a function does not return a value, preventing errors and unexpected element behavior by signaling when a value, object, or function is missing or invalid.

In programming languages like JavaScript, “null” shows that a specific element has no assigned value, rather than having a value of zero, an empty string, or any other data you may interpret as valid.

For example, a variable called result stores a specific calculation's output. If the calculation fails or produces an invalid result, you can assign a null value to the variable with this code snippet:

let result = null;

The output indicates the variable has no assigned value, informing other parts of the program that the result needs replacing before use.

Other glossary terms

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Hmm…we couldn’t find any results. Try a different search term or reset the filter.
Reset the filter
Load more