TGViewer
Diyorbek.dev | 👨🏻‍💻 Diyorbek.dev | 👨🏻‍💻 @diyorbekk_dev · 379 subscribers
Post #683 137
What is the difference between == and === operators?

JavaScript provides both strict(===, !==) and type-converting(==, !=) equality comparison. The strict operators take type of variable in consideration, while non-strict operators make type correction/conversion based upon values of variables. The strict operators follow the below conditions for different types,

1) Two strings are strictly equal when they have the same sequence of characters, same length, and same characters in corresponding positions.

2) Two numbers are strictly equal when they are numerically equal. i.e, Having the same number value.

There are two special cases in this,

▪️ NaN is not equal to anything, including NaN.
▪️ Positive and negative zeros are equal to one another.


3) Two Boolean operands are strictly equal if both are true or both are false.

4) Two objects are strictly equal if they refer to the same Object.

5) Null and Undefined types are not equal with ===, but equal with ==. i.e, null===undefined --> false but null==undefined --> true


One Step ahead of the best✊

@Diyorbekk_dev
  • ❤‍🔥 1
  • ☃ 1
  • 👍 1
More from @diyorbekk_dev
  1. Sep 15, 2026ChatGPT and Codex now support TSRX syntax Highlighting! #tsrx #OctaneJS
  2. Sep 14, 2026Tanner Linsleydan yangilik. Hozirgacha Tanstack Team Octane uchun katta yordam berib kelmo…
  3. Sep 10, 2026Octane Js Hozirda Instagramda bitta content topoldim. Nasib tez kunda òzim yangiliklar qòy…
  4. Sep 9, 2026Ajoyib yangiliklardan biri. Tez orada Open AI butunlay òtadi nasib OctaneJs’ga. Tarqatmay…
  5. Sep 5, 2026Yangi joyni ham tizimlashtirdik. Bir qancha yangi imkoniyatlar qo‘shildi va yangi funksiya…
  6. Sep 5, 2026photo post
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →