Language concepts

Object identity

Try the free JavaScript compiler

Strict equality for objects tests identity rather than equivalent contents. Evaluating two object literals separately creates distinct objects. Copying an object value into another binding preserves identity and can expose shared mutation.

Formal Syntax & Structure

javascript syntaxjavascript
a === b

Working Example

Example Snippetjavascript
const a = {};const b = a;console.log(a === b);console.log(a === {});
JavaScript Reference