---
title: "Discussion on \"Do you really think that loose equals (==) compares the value and strict equals (===) compares the value as well as the type of two variables in JS?\" | Hashnode"
description: "Discussion on \"Do you really think that loose equals (==) compares the value and strict equals (===) compares the value as well as the type of two variables in JS?\". I am sure you must have used loose equals (==) and strict equals (===) in JavaScript while comparing two variables. Have you wondered what is the difference between them?\nIf you think that loose equals (==) compares the value and strict equals (===) ..."
url: "https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94"
---

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

Discussion

# [Do you really think that loose equals (==) compares the value and strict equals (===) compares the value as well as the type of two variables in JS?](https://blog.shahbazkhan.in/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js?utm_source=hashnode&utm_medium=feed)

I am sure you must have used loose equals (==) and strict equals (===) in JavaScript while comparing two variables. Have you wondered what is the difference between them? If you think that loose equals (==) compares the value and strict equals (===) ...

Jan 13, 2022 · 3 min read · blog.shahbazkhan.in  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#frontend](https://hashnode.com/tag/frontend)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#learning-journey](https://hashnode.com/tag/learning-journey)

## Written by

[Shahbaz Khan's Blog](https://hashnode.com/@shahbazkhan)

@shahbazkhan · Mumbai, India

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

Frontend Engineer

Passionate Frontend Engineer with almost 5 years of experience in building responsive, accessible, scalable, and intuitive web applications. Successfully developed multiple web applications with a proven record of quality-driven work and high contract profitability. Aspire to learn more and create an impact by solving problems and making the web more accessible and user-friendly.

## Responses 4

Markdown supported · ⌘↵ to post

[Hamza Raza](https://hashnode.com/@Razahamza)

[Aug 2, 2022](https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94/comment/62e94a7792b7fd0a78c338c1)

I was looking for just the thing. Thanks for the clear explanation. Keep up the good work!

[Al Hera Ahmad](https://hashnode.com/@alheraahmad)

[Jan 15, 2022](https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94/comment/61e2b4141f35f37864469460)

Well Explained! I will expect more such blogs from now

[Shahbaz Khan's Blog](https://hashnode.com/@shahbazkhan)

[Jan 15, 2022](https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94/comment/61e2b4141f35f37864469460#reply-61e2bf5bd546507ab0344690)

Thanks Al Hera, I’ll definitely try to write more 😊

[Sakshi Chaudhary](https://hashnode.com/@sakshiChaudhary)

[Jan 14, 2022](https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94/comment/61e10dc91f35f37864466f2f)

Great explanation 👏

[Shahbaz Khan's Blog](https://hashnode.com/@shahbazkhan)

[Jan 14, 2022](https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94/comment/61e10dc91f35f37864466f2f#reply-61e112dad546507ab034203e)

Thanks Sakshi 🙌🏻

[Dhanush](https://hashnode.com/@Dhanush57)

[Jan 14, 2022](https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94/comment/61e108401f35f37864466ee7)

Thanks for this nice and clean explanation

[Shahbaz Khan's Blog](https://hashnode.com/@shahbazkhan)

[Jan 14, 2022](https://hashnode.com/posts/do-you-really-think-that-loose-equals-compares-the-value-and-strict-equals-compares-the-value-as-well-as-the-type-of-two-variables-in-js/61e061c3ffa55d74f0089e94/comment/61e108401f35f37864466ee7#reply-61e1129e1f35f37864466fcb)

Glad you liked it 😊
