Asked • 05/03/23

How do you explain equality in JavaScript?

  1. Strict comparison (e.g., ===) checks for value equality without allowing coercion
  2. Abstract comparison (e.g. ==) checks for value equality with coercion allowed
var a = "42";
var b = 42;

a == b; // true
a === b; // false

1 Expert Answer

By:

Nathan M. answered • 05/04/23

Tutor
5 (49)

Full-Stack Software Engineer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.