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)