Zakary  Goyette

Zakary Goyette

1600870560

Everything about null in JavaScript

JavaScript has 2 kinds of types: primitives (strings, booleans, numbers, symbols) and objects.

Objects are complex data structures. The simplest object in JavaScript is the plain object — a collection of keys and associated values:

let myObject = {
  name: 'Eric Cartman'
};

But there are situations when an object cannot be created. For such cases, JavaScript provides a special value null — which indicates a missing object.

let myObject = null;

In this post, you’ll learn everything about null in JavaScript: its meaning, how to detect it, the difference between null and undefined, and why using null extensively creates code maintenance difficulties.

#javascript #null #object #machine-learning

Everything about null in JavaScript