Skip to content

Instantly share code, notes, and snippets.

@zach-snell
Last active September 21, 2016 04:03
Show Gist options
  • Save zach-snell/6834f7d23a171856cfba7ee44a619ed4 to your computer and use it in GitHub Desktop.
Save zach-snell/6834f7d23a171856cfba7ee44a619ed4 to your computer and use it in GitHub Desktop.
Swift 3 Bottom Up: Ep1 - Constants, Variables, Types, and Comments
//: 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)")
@zach-snell
Copy link
Author

Feel free to download this as .playground extension. Swift extension is used here to keep coloration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment