What is Xcode?
Xcode is an Integrated Development Environment.
Meaning it has code editor, compiler, Debugger, and graphical user interface.
How to install xcode?
Xcode can be installed by downloading it from the Mac App Store.
What is a comment?
a comment documents functionality, provides instructions for coworkers and instructions for third party coders.
and example comment is //
What are constants?
What are variables?
A construct that holds on to or stores a piece of information.
//: Playground – noun: a place where people can play
var str = “Hello, playground” //var is a reserved keyword construct for variable and str is the name of the variable string. The red letters enclosed in double quotes is the information or string that is stored in the str variable. the equals sign is the assignment operator.
str = “Hello, world”
//Declaring a variable
var number = 10
//The keyword var is used to create a new variable;
//types of variables: strings(str) and integers(int)
var language = “Swift”
language = “Objective-C”;
//What are constants? Constants are similar to variables as they too are used to store information. However, as their name states they remain constant which means their value cannot be changed.
let language2 = “Swift”;
//language2 = Russ
//Mutable means changeable. A var is a mutable type . Constants are immutable meaning its values cannot be changed.
//Create a constant named favoriteDessert and assign to it a string containing your favorite dessert. Remember the syntax for a string is some text enclosed with two double quotes.
let favoriteDessert = “chocolate icecream”
Rule #1: Spaces not allowed
let programming language = “Objective-C”
Rule #2 use camel case.
let programmingLanguage = “Objective-C
let favoriteProgrammingLangauge = Swift.
Cannont start with a number
nO whitespace characters
no specail characters
no mathematical symbols
//to use emoji as variables
//Edit ->Emoji & Symbols.