I've written this code in a .playgraound
var a = [1, 2, 3]
var b = a
var c = a
if b === c
{
"b and c still share the same array elements."
}
else
{
"b and c now refer to two independent sets of array elements."
}
The result is "b and c now refer to two independent sets of array elements" but in "The Swift Programming Language" Apple says that
The example below uses the “identical to” operator (===) to check whether b and c still share the same array elements.
Can you explain me why they are different?