0
What is the difference between identical to and equal to?
Does identical to mean that if one instance changes, the other will change as well?
5 odpowiedzi
0
yes, "identical to" is to check the same reference and "equal to" is to check the same value.
e.g.,
let "a" and "b" are same reference.
if you change a's value, b's value will change.
0
In swift we have (===) and (==) === which checks if is identical; checks if the values look exacly the same. And === checks if both values point to the same reference
0
In swift there are 3 types:1)=== for comparing the 2 instances,2)== for checking 2 strings or 2 elements of an array or comparing 2 values in a variables 3)= for assigning value to a variable.
0
One and 1 are equal, but not identical.
- 1
yes, identical to mean that two references have a same insrance and that's the case withe classes