Programming Tip Of The Day #13: == vs === | Difference Between Double vs Triple Equals in JavaScript

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • Welcome all, we will see Difference Between Double vs Triple Equals in JavaScript in Hindi. == vs === in Javascript.
    Double equals
    When using double equals in JavaScript we are testing for loose equality. Double equals also performs type coercion.
    Type coercion means that two values are compared only after attempting to convert them into a common type.
    Triple Equals
    When using triple equals === in JavaScript, we are testing for strict equality. This means both the type and the value we are comparing have to be the same.
    The == operator will compare for equality after doing any necessary type conversions. The === operator will not do the conversion, so if two values are not the same type === will simply return false.
    Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.
    Don't Forget to Follow me on all Social Network,
    Instagram Link: / vinodthapa55
    Facebook Link: / vinodthapa55
    Twitter Link: / vb55thapa
    Facebook ThapaTechnical Page Link: / vinodbahadur. .

КОМЕНТАРІ • 13