/Swift-101-Optionals

The supplementary Swift Playground to Swift 101 - Optionals

Primary LanguageSwiftMIT LicenseMIT

Swift 101 - Optionals

The supplementary Swift Playground to Swift 101 - Optionals.

Playground source

/*:
 # Swift 101 - nil
 https://medium.com/pretty-swifty/optionals-b8d1e6bcddd
 
 Today I’ll be blogging about another fundamental concept in Swift — Optional variables.
 */

// The following variables are all optional

var optionalInt: Int?
var optionalBool: Bool?
var optionalString: String?

// Uncomment the next line to how optional variables must not be declared `let`
//let optionalLetString: String?