---
title: "Discussion on \"Why Are Two Similar Objects Not Equal in JavaScript?\" | Hashnode"
description: "Discussion on \"Why Are Two Similar Objects Not Equal in JavaScript?\". In JavaScript, two objects may not be equal even though they appear to be similar. Why is that the case? 🤔 Let's understand why.\nFor example:\nconst obj1 = {\n  name: \"Dillion\"\n}\nconst obj2 = {\n  name: \"Dillion\"\n}\n\nconsole.log(obj1 === obj2)\n// false\n..."
url: "https://hashnode.com/posts/why-are-two-similar-objects-not-equal-in-javascript/64ba84140ea82767eac74a96"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Are Two Similar Objects Not Equal in JavaScript?](https://lalitkumawat1m.hashnode.dev/why-are-two-similar-objects-not-equal-in-javascript?utm_source=hashnode&utm_medium=feed)

In JavaScript, two objects may not be equal even though they appear to be similar. Why is that the case? 🤔 Let's understand why. For example: const obj1 = { name: "Dillion" } const obj2 = { name: "Dillion" } console.log(obj1 === obj2) // false ...

Jul 21, 2023 · 5 min read · lalitkumawat1m.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#webdev](https://hashnode.com/tag/webdev)

## Written by

[Lalit Kumawat](https://hashnode.com/@lalitkumawat1m)

@lalitkumawat1m · India

  
[View profile](https://hashnode.com/@lalitkumawat1m)

Tech Enthusiasts

🧑‍💻 Web &amp; App Developer • Nextjs • Reactjs • Flutter 💙 • Nodejs • Java • DSA • #opensouce

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
