Skip to content

Instantly share code, notes, and snippets.

@wptechprodigy
Last active August 4, 2021 14:42
Show Gist options
  • Save wptechprodigy/94aee9c38af27dc87f79cbb2607aeb5f to your computer and use it in GitHub Desktop.
Save wptechprodigy/94aee9c38af27dc87f79cbb2607aeb5f to your computer and use it in GitHub Desktop.
DayOne - Variables and Types in Swift
import Foundation
// MARK: - VARIABLES
/*
Variables are data stored that can have their value change whenever we want it and
constant are value that can not be changed.
The advantage of using var in declaring a variable and let in declaring a constant is that
it help xcode to remind us of the constant we have set and whenever we try to change it,
it will not xcode will not compile our code and it help to save memory space that is optimization of memory.
*/
// Declaring a variable
var name: String = "Christopher"
// Updating the variable
name = "Fortune"
@Gabbrolee
Copy link

noted sir.....thanks a million

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