DEV Community

Cover image for ๐ƒ๐ข๐Ÿ๐Ÿ๐ž๐ซ๐ž๐ง๐œ๐ž ๐›๐ž๐ญ๐ฐ๐ž๐ž๐ง ๐๐จ๐ฎ๐›๐ฅ๐ž ๐ž๐ช๐ฎ๐š๐ฅ๐ฌ == ๐š๐ง๐ ๐ญ๐ซ๐ข๐ฉ๐ฅ๐ž ๐ž๐ช๐ฎ๐š๐ฅ๐ฌ === ๐ข๐ง ๐‰๐š๐ฏ๐š๐’๐œ๐ซ๐ข๐ฉ๐ญ ?
RUDRESH
RUDRESH

Posted on

๐ƒ๐ข๐Ÿ๐Ÿ๐ž๐ซ๐ž๐ง๐œ๐ž ๐›๐ž๐ญ๐ฐ๐ž๐ž๐ง ๐๐จ๐ฎ๐›๐ฅ๐ž ๐ž๐ช๐ฎ๐š๐ฅ๐ฌ == ๐š๐ง๐ ๐ญ๐ซ๐ข๐ฉ๐ฅ๐ž ๐ž๐ช๐ฎ๐š๐ฅ๐ฌ === ๐ข๐ง ๐‰๐š๐ฏ๐š๐’๐œ๐ซ๐ข๐ฉ๐ญ ?

Double equals== is used for ๐‘๐‘œ๐‘š๐‘๐‘Ž๐‘Ÿ๐‘–๐‘›๐‘” ๐‘ก๐‘ค๐‘œ ๐‘ฃ๐‘Ž๐‘Ÿ๐‘–๐‘Ž๐‘๐‘™๐‘’๐‘ , but it ๐‘–๐‘”๐‘›๐‘œ๐‘Ÿ๐‘’๐‘  the variable's datatype whereas Triple equals=== is used for comparing two variables, but this operator ๐‘Ž๐‘™๐‘ ๐‘œ ๐‘โ„Ž๐‘’๐‘๐‘˜๐‘  ๐‘‘๐‘Ž๐‘ก๐‘Ž๐‘ก๐‘ฆ๐‘๐‘’.

== returns true only if the two operands are ๐‘’๐‘ž๐‘ข๐‘Ž๐‘™ while === returns true only if two variables ๐‘ฃ๐‘Ž๐‘™๐‘ข๐‘’๐‘  and ๐‘‘๐‘Ž๐‘ก๐‘Ž ๐‘ก๐‘ฆ๐‘๐‘’๐‘  are the ๐‘ ๐‘Ž๐‘š๐‘’.

Top comments (0)