"\"Hello, Jay\", said the teacher." or "Happy birthday, dear \(name)." = newline \t = tab
Back
Arithmetic operator
Front
+ for plus, - for minus, * for multiplication, / for division, and % for modulus.
Back
not equal to? (comparison operator)
Front
!=
Eg: (a != b)
Back
constant
Front
An identifier that is immutable and can never be changed. Declared with let.
Eg: let greeting = "hello"
Back
assignment
Front
used to give a name a value when you first declare a name or update a variable's value.
Eg: let numOfSodas = 8
Back
variable
Front
an identifier that is mutable and can be updated by assigning a new value at any time. Declared with var
Back
equal to? (comparison operator)
Front
==
let name = "world"
if name == "world" {
print("hello, world")
}
Back
Unicode standard
Front
Defines a way to represent almost any character from any language in a consistent way.
Back
function
Front
Combines detailed steps into a single block of code that can be used again and again.
Eg: print ( )
Back
Compound Assignment Operatory
Front
+=
Back
Argument
Front
Used to given an input value to a function.
Back
or (logical operator)
Front
||
Eg: let hasDoorKey = false
let knowsOverridePassword = true
if hasDoorKey || knowsOverridePassword {
print("Welcome!")
} else {
print("ACCESS DENIED")
}
Back
log
Front
A record of information about a program as it runs.
Back
print
Front
A function that tells a Swift program to log a message to the console.
Back
comment
Front
Notes left by the programmer to explain the code. Comment out by putting // in front of the code.
Back
Error
Front
A general term for a problem with the code.
Back
assignment operator
Front
=
Back
Debugging
Front
The process of identifying and fixing an error.
Back
playground
Front
An environment in Xcode where you can experiment with code and see instant results.
Back
Parameter
Front
To work with an input value inside a function.
Back
String interpolation
Front
Used when a value of a constant or variable is inserted in the middle of a string literal.
Eg: let friendName = "lee"
print ("Have a good one, \(friendName)")
Back
and (logical operator)
Front
&&
Eg: let enteredDoorCode = true
let passedRetinaScan = false
if enteredDoorCode && passedRetinaScan {
print("Welcome!")
}
Back
String
Front
Text values are called strings, surrounded by quotation marks. Eg: "Hello, World!"
Back
camel case
Front
format used to create identifiers: first name is lowercase, no spaces, and next word is capitalized. Eg: firstName
Back
escape character
Front
(\) used in a string to tell Swift to treat what comes next as special. Called this because it escapes from the normal behavior of a string.
Back
identifier
Front
Refers to a value, type and is formal word for a name in code. Eg: var NumOfStudents = 4
Back
keyword
Front
Have special meanings in Swift and can't be used for other purposes. Eg: func, let, var,