Instantly share code, notes, and snippets.

Embed
What would you like to do?
// vars
var mutableBeverage = "Leffe"
println(mutableBeverage) // "Leffe"
mutableBeverage = "Bud"
println(mutableBeverage) // "Bud"
mutableBeverage = mutableBeverage + "weiser"
println(mutableBeverage) // "Budweiser"
// lets
let immutableBeverage = "Bud"
println(immutableBeverage) // "Bud"
immutableBeverage = "Leffe" // Compiler error
immutableBeverage = immutableBeverage + "weiser" // Compiler error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment