Last active
September 21, 2016 04:03
-
-
Save zach-snell/6834f7d23a171856cfba7ee44a619ed4 to your computer and use it in GitHub Desktop.
Swift 3 Bottom Up: Ep1 - Constants, Variables, Types, and Comments
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
//: Playground - noun: a place where people can play | |
import UIKit | |
// Constants - Not Mutable, unchanging | |
let constantString = "Hello" | |
// Typed Constant | |
let constantFloat: Float = 2 | |
type(of: constantFloat) | |
constantFloat | |
/* Variables - The following variables are mutated and changed at will, they may not be the same as they were defined */ | |
var changingString = "World" | |
changingString = constantString + " " + changingString | |
print("\(changingString)") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feel free to download this as .playground extension. Swift extension is used here to keep coloration.