Use Strict Equality

Prefer === instead of == to avoid type coercion.

Preview

Code

<script>
let a = 5;
let b = "5";

console.log(a == b);
console.log(a === b);
</script>

More JS Conventions Examples (7)