Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
21 Cards in this Set
- Front
- Back
What are the new feature of swift? |
|
|
Describe the type Inference feature in Swift. |
Inferring the type of a variable by it value. |
|
Describe the switch statement enhancements |
Swifts switch statements can test values of any type |
|
What are swifts access modifiers? |
|
|
Describe the public access modifier. |
A class that’s declared public can be reused in other apps |
|
Describe the internal access modifier. |
A class that's declared internal can only be used by code in the same project |
|
Describe the private access modifier. |
A class thats declared private can only be used in the file for wich it is defined. |
|
What are swifts stored properties? |
Stored properties are basically instance variables with getter and setters built in |
|
How would you define a variable whose property is public but it can only be set by the file in wich it is defined |
public private(set) var balance: Double = 0.0 |
|
Can initializers return values? |
No |
|
what is the shortcut for the quick help key |
option + click on item |
|
What is the shortcut for jump to Definition functionality |
control + click on item |
|
What is a value type? |
A value-type constant’s or variable’s value is copied when it’s passed to or returned from a function or method, when it’s assigned to another variable or when it’s used to initialize a constant. |
|
What is a reference type? |
A constant or variable of a reference type (often called a reference) is said to refer to an object. Conceptually this means that the constant or variable stores the object’s location. Unlike Objective-C, C and C + +, though, that location is not the actual memory address of the object, rather it’s a handle that enables you to locate the object so you can interact with it. |
|
Do objects assigned to constants make the objects constant? |
No the contant just will always point to the same object |
|
How do you compare reference types |
=== and !=== |
|
what is this operator (...) |
That is the closed range operator, creates a sequential collection. It is called closed because both ends have a discrete value. 10 ... 20 |
|
What are the patterns a case statement can include? |
|
|
Describe a while loop |
a while loop continues till something is false |
|
Desribe the do while loop |
The do... while statement tests the loop-continuation condition after executing the loop’s body; therefore, the body always executes at least once. |
|
What is the swifts global function stride? |
stride(from: 11, through:1, by:-2) From 11 to 1 iterating -2 down |