Syntax

JavaScript Strict Equality Syntax

In JavaScript, strict equality: compares value and type without conversion — a === b

Quick Answer

Syntax
a === b
JavaScriptSyntax

Strict Equality

Code example
a === b

Compares value and type without conversion.

Learn More

How to strict equality in JavaScript

  1. Open your JavaScript file or editor.
  2. Copy the example, then replace its sample names and values for your code.

JavaScript Strict Equality Syntax

Use a === b.

Related Syntax References

Frequently asked questions

What is the JavaScript syntax for strict equality?

Use this pattern: a === b

Can I copy this JavaScript code example?

Yes. Use Copy code and adapt the example to your program.

Is this JavaScript syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify