Swift Flashcards
What is a nil value?
Nothing
What is the purpose of nil?
Used to represent the absence of a value.
Can ints be assigned to nil?
False
Can ints be assigned to objects?
False
What is a function?
Self contained chucks of code that performs a specific task.
Do you give a name to a function to be called upon?
Yes
What is a method?
Functions that are associated with a particular type.
What are some instance methods in swift?
Classes, structures, and enumerations because they all encapsulate a specific task.
What is a syntax?
Specific rules and symbols that are considered correctly structured in code.
Does every function in swift have a type?
True
What is a return statement?
Tells the program to return to the original address.
What is () called?
Placeholder
What does a if/else statement do?
If a condition is met execute the code else execute the second line of code.
> , =, <=
These are examples of what kind of operators?
Comparison Operators
What is an instance?
A var defined in a class.
What is nesting?
Loops that contain other loops.