creates logical expressions where both values must be true for the overall expression to also be true.
Back
Unary Minus Operator
Front
The sign of a numeric value can be toggled using a prefixed -
Back
closed range operator (a...b)
Front
defines a range that runs from a to b, and includes the values a and b
Back
logical operators
Front
modify or combine the Boolean logic values true and false.
Back
true
Front
It is sometimes useful to include parentheses when they are not strictly needed, to make the intention of a complex expression easier to read.
Back
range operators
Front
shortcuts for expressing a range of values
Back
Remainder (%)
Front
works out how many multiples of b will fit inside a and returns the value that is left over (known as the remainder)
Back
logical NOT
Front
Inverts a Boolean value so that true becomes false, and false becomes true.
Back
assignment operator (=)
Front
operator does not return a value
Back
logical OR
Front
a||b
Back
String interpolation
Front
a way to construct a new String value from a mix of constants, variables, literals, and expressions by including their values inside a string literal.
Back
a = a + 2
Front
a += 2 shorthand for
Back
Ternary
Front
operate on three targets.
Back
let
Front
How do you declare a constant?
Back
+=
Front
How do you add to a mutable string?
Back
horizontal tab
Front
\t
Back
value
Front
Swift's String type is a _ type.
Back
line feed
Front
Back
question ? answer1 : answer2
Front
what are the three parts to a ternary conditional operator
Back
ternary conditional operator
Front
special operator with three parts
Back
nil coalescing operator (a ?? b)
Front
unwraps an optional a if it contains a value, or returns a default value b if a is nil. (name and implementation)
Back
nil coalescing operator
Front
a != nil ? a! : b what is the name of the shorthand for this
Back
string literal
Front
fixed sequence of textual characters surrounded by a pair of double quotes ("").
Back
bool
Front
comparison operators return a ___ value to indicate whether or not the statement is true
Back
carriage return
Front
\r
Back
Compound Assignment Operators
Front
combine assignment (=) with another operation
Back
U0024
Front
"\u{24}"
Back
double quote
Front
\"
Back
unsigned
Front
An integer that is positive or zero
Back
Unicode
Front
an international standard for encoding, representing, and processing text in different writing systems
Back
half-open range operator (a..<b)
Front
defines a range that runs from a to b, but does not include b.
Back
identity operators
Front
to test whether two object references both refer to the same object instance.
Back
logical AND
Front
a&&b
Back
logical NOT
Front
!a
Back
single quote
Front
\'
Back
characters
Front
ou can access the individual Character values for a String by iterating over its _ property
Back
ternary conditional operator
Front
question ? answer1 : answer2
Back
Unicode Scalars
Front
a unique 21-bit number for a character or modifier, such as U+0061 for LATIN SMALL LETTER A ("a"), or U+1F425 for FRONT-FACING BABY CHICK ("🐥").
Back
null character
Front
\0
Back
logical OR
Front
You use it to create logical expressions in which only one of the two values has to be true for the overall expression to be true.
Back
Binary
Front
operators operate on two targets (such as 2 + 3)
Back
operator
Front
special symbol or phrase that you use to check, change, or combine values.
Back
;
Front
How do you write multiple statements on a single line?
Back
+
Front
String values can be added together (or concatenated) with the addition operator (___) to create a new String value:
Back
Unary
Front
operators operate on a single target (such as -a)
Back
"\u{24}"
Front
U0024
Back
backslash
Front
\\
Back
var
Front
How do you declare a variable?
Back
.isEmpty
Front
How do you see if a String is empty?
Back
signed
Front
An integer that is either positive, negative or zero is a _ integer.
Back
Section 2
(18 cards)
greeting[greeting.endIndex.predecessor()]
Front
How would you access the final letter of the string greeting
Back
Extended Grapheme Clusters
Front
is a sequence of one or more Unicode scalars that (when combined) produce a single human-readable character.
Back
Array<Element>
Front
The type of a Swift array is written in full as
Back
predecessor()
Front
A String.Index value can access its immediately preceding index by calling the ___ method
Back
array
Front
stores values of the same type in an ordered list
Back
initialize
Front
the process of preparing an instance of a class, structure, or enumeration for use.
Back
var threeDoubles = [Double](count: 3, repeatedValue: 0.0)
Front
How do you create an Array<Double> with three elements each with a value of 0.0
Back
String values
Front
considered equal if their extended grapheme clusters are canonically equivalent.
Back
deinitialize
Front
performs any custom cleanup just before an instance of that class is deallocated
Back
true
Front
Extended grapheme clusters are canonically equivalent if they have the same linguistic meaning and appearance, even if they are composed from different Unicode scalars behind the scenes.
Back
successor()
Front
access its immediately succeeding index
Back
unicode scalar
Front
in order to determine which Character is at a particular position, you must iterate over each __ __ from the start or end of that String.
Back
startIndex
Front
Use the __ property to access the position of the first Character of a String
Back
equal
Front
If a String is empty the startIndex and endIndex are __
Back
runtime
Front
Attempting to access a Character at an index outside of a string's range will trigger a __ error
Back
initializers
Front
called to create a new instance of a particular type. In its simplest form
Back
String.Index
Front
which property corresponds to the position of each Character in the string.
Back
welcome.insert("!", atIndex: welcome.endIndex)
Front
How would you insert a "!" character to the end of the string var welcome = "hello" ?