Created
February 10, 2015 08:02
-
-
Save nolili/6e209065d172945cb2a8 to your computer and use it in GitHub Desktop.
Swift 1.2 if let...
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
var hello:String? = "Hello" | |
var goodbye:String? = "Goodbye" | |
// Swift 1.2 | |
if let a = hello, b = goodbye { | |
println(a + " ," + b) | |
} | |
// Swift 1.1 | |
if let a = hello { | |
if let b = goodbye{ | |
println(a + " ," + b) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment