diff options
author | Elijah Karari <eljhkrr@gmail.com> | 2015-11-02 15:52:27 +0300 |
---|---|---|
committer | Elijah Karari <eljhkrr@gmail.com> | 2015-11-02 15:52:27 +0300 |
commit | 344518d2f60c6373f7814752fc53ef5603b605a9 (patch) | |
tree | 7e48a776ab06c741475b2189527b60a30d291ca8 /swift.html.markdown | |
parent | edfc99e198fd2e87802ea81d6779fbadfab64919 (diff) | |
parent | 824869ef99de73e87ef791bac880f4575cc9ddc9 (diff) |
Merge pull request #2 from adambard/master
Update my fork to upstream
Diffstat (limited to 'swift.html.markdown')
-rw-r--r-- | swift.html.markdown | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/swift.html.markdown b/swift.html.markdown index f451288d..f3746613 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -6,6 +6,7 @@ contributors: - ["Joey Huang", "http://github.com/kamidox"] - ["Anthony Nguyen", "http://github.com/anthonyn60"] - ["Clayton Walker", "https://github.com/cwalk"] + - ["Fernando Valverde", "http://visualcosita.xyz"] filename: learnswift.swift --- @@ -25,6 +26,7 @@ import UIKit // Xcode supports landmarks to annotate your code and lists them in the jump bar // MARK: Section mark +// MARK: - Section mark with a separator line // TODO: Do something soon // FIXME: Fix this code @@ -82,7 +84,7 @@ if someOptionalString != nil { someOptionalString = nil /* - Trying to use ! to access a non-existent optional value triggers a runtime + Trying to use ! to access a non-existent optional value triggers a runtime error. Always make sure that an optional contains a non-nil value before using ! to force-unwrap its value. */ @@ -128,6 +130,7 @@ shoppingList[1] = "bottle of water" let emptyArray = [String]() // let == immutable let emptyArray2 = Array<String>() // same as above var emptyMutableArray = [String]() // var == mutable +var explicitEmptyMutableStringArray: [String] = [] // same as above // Dictionary @@ -139,6 +142,7 @@ occupations["Jayne"] = "Public Relations" let emptyDictionary = [String: Float]() // let == immutable let emptyDictionary2 = Dictionary<String, Float>() // same as above var emptyMutableDictionary = [String: Float]() // var == mutable +var explicitEmptyMutableDictionary: [String: Float] = [:] // same as above // |