Last active
August 29, 2015 14:02
-
-
Save fakefish/7d93bea637783fa95741 to your computer and use it in GitHub Desktop.
some code of 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
var myVariable = 42 | |
let myVariable = 42 | |
let explicitDouble: Double = 70 | |
let lable = "The width is " | |
let width = 94 | |
let widthLable = label + String(width) | |
let apples = 3 | |
let oranges = 5 | |
let appleSummary = "I have \(apples) apples." | |
let fruitSummary = "I have \(apples + oranges) pieces of fruit." | |
var shoppingList = ["catfish", "water", "tulips", "blue paint"] | |
shppingList[1] = "bottle of water" | |
var occupations = [ | |
"Malcolm": "Captain", | |
"Kaylee": "Mechanic", | |
] | |
occupations["Jayne"] = "Public Relations" | |
let emptyArray = String[]() | |
let emptyDictionary = Dictionary<String, Float>() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment