Difference between == and ===

Posted zzfx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Difference between == and ===相关的知识,希望对你有一定的参考价值。

In swift 3 and above

=== (or !==)

  • Checks if the values are identical (both point to the same memory address).
  • Comparing reference types.
  • Like == in Obj-C (pointer equality).

== (or !=)

  • Checks if the values are the same.
  • Comparing value types.
  • Like the default isEqual: in Obj-C behavior.

Here I compare three instances (class is a reference type)



https://stackoverflow.com/questions/24002819/difference-between-and

以上是关于Difference between == and ===的主要内容,如果未能解决你的问题,请参考以下文章

python: the difference between append and extend

Difference between Netbios and Host name

Difference between == and ===

Difference between complex and complicated?

Difference between WCF and Web API and WCF REST and Web Service

Difference between $.ajax() and $.get() and $.load()