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;
4 Cards in this Set
- Front
- Back
What is an optional type? |
An optional is an enum with two cases. One contains a nil, the other a value. |
|
How do we show that a type is optional |
Place a ? after the type declaration. |
|
How would we declare a variable named 'number' as an optional Int? |
var number:Int? |
|
What does the var number:Int contain? |
nil |