---
title: "Comment by Dinys Monvoisin on \"Why you shouldn't use Double Equals Operator in JavaScript\" | Hashnode"
description: "The title of your post does not match your conclusion. The reason people tend to use triple equals is that they are not entirely sure what they are comparing. H"
url: "https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b"
---

[Discussion](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe)

Comment [Why you shouldn't use Double Equals Operator in JavaScript](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe)

[Dinys Monvoisin](https://hashnode.com/@dinmon)

[Sep 2, 2020](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b)

The title of your post does not match your conclusion. The reason people tend to use triple equals is that they are not entirely sure what they are comparing. However, if you know both operands is a certain type, double equals are fine.

If you would tell me to write a web application from scratch, I would use double equals, the reason is to force people to write deterministic code.

[Hrithwik Bharadwaj](https://hashnode.com/@hrithwik)

[Sep 2, 2020](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b#reply-5f4f684bc0ee3d260ba90367)

Yeah everyone has their own reasons but most of the time people should use '===' unless someone wants to check if a variable is null or undefined. Any suggestion for the conclusions ?

[Dinys Monvoisin](https://hashnode.com/@dinmon)

[Sep 2, 2020](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b#reply-5f4f699af6e5c425ea6962fc)

I may be biased, but before I was using only triple equals. Now I prefer double equals.

For the conclusion, I would say it depends on the level of experience of the team of developers. If your team consist of most junior developers and you do not have proper standard for checking of types, stick with triple equals. Simple and reliable.

[Tapas Adhikary](https://hashnode.com/@atapas)

[Sep 2, 2020](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b#reply-5f4f922cf6e5c425ea696614)

[Dinys Monvoisin](https://hashnode.com/@dinmon),

Interesting thought. Do you recommend `Object.is` usage as it is more focused on the similarity than equality? It seems, `Object.is` would be more safeguarding with the experience level you were mentioning.

`===` and `Object.is` are having lesser gotchas than the `==` anyways.

[Dinys Monvoisin](https://hashnode.com/@dinmon)

[Sep 2, 2020](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b#reply-5f4f9e25397a30282ba3867c)

[Tapas Adhikary](https://hashnode.com/@atapas),

If I am not mistaken `Object.is` one of the edge cases is `-0`. There are only a few such cases. Therefore, I prefer to stick with `==` as it is less verbose and only recommend using `Object.is` only for those.

However, many people do not know the various coercions of `==`, but most of the obscure one like `"" == false` should at first hand never see the day in the application you develop.

[Mark](https://hashnode.com/@mverleg)

[Sep 2, 2020](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b#reply-5f50087098ae9829ac3da712)

What do you mean by deterministic code? The way I understand determinism, it's unrelated to `==`.

I would agree it's better to know the types of things you're comparing. But it doesn't hurt to use `===` to prevent surprises, right? Experienced developers are not immune to making mistakes.

[Dinys Monvoisin](https://hashnode.com/@dinmon)

[Sep 3, 2020](https://hashnode.com/posts/lose-equality-and-strict-equality-in-javascript/5f4f5b5af6e5c425ea6960fe/comment/5f4f65aff6e5c425ea69627b#reply-5f5089c498ae9829ac3daa21)

Determinism in terms of the types you are comparing.

I would not argue any further, it a preference, a choice you make.

Think about it. If you know both types are the same, putting an extra `=` to make `===`, isn't redundant.

Anyway, those things are agreed upon in a coding convention done by your team. If you usually use `===`, it is okay.
