Created
March 28, 2019 17:37
-
-
Save dkw5877/65246801b1821db6d32fa461fe4b2c86 to your computer and use it in GitHub Desktop.
Testing equality in collections in Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let strings1 = ["a", "b", "c"] | |
let strings2 = ["a", "b", "c"] | |
var isEqual = strings1 == strings2 //true | |
let strings1 = ["a", "b", "c"] | |
let strings2 = ["a", "b", "d"] | |
var isEqual = strings1 == strings2 //false | |
let strings1 = ["a", "b", "c"] | |
let strings2 = ["b", "c", "a"] | |
var isEqual = strings1 == strings2 //false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment