Introduction to Swift and Playgrounds
Learn about the origin of Swift and some of its basic syntax.
Constants, Variables, and Data Types
Learn how to define constants for values that don’t change and variables for values that do. Learn the data types that are included in Swift and how they can help you write better code.
Learn about some of the operators in the Swift language, including basic math operators.
Learn how to use logical operators in Swift to check conditions; learn how to use control flow statements.
Learn how to create and store text using the string type. You’ll learn a variety of string methods that allow you to compare two strings, access specific characters within a string, and insert and remove values.
Learn how to declare functions with different parameters and return types.
Learn how to create structures in Swift.
Learn what makes classes different from structures and when to use classes instead of structures. Also learn about inheritance, superclasses, and subclasses.
Learn to use “optionals” to properly handle situations when data may or may not exist.
Learn about the various collection types available in Swift and how to choose the appropriate one for your program.
Learn how to create loops in Swift, control the conditions for looping, and specify when to stop.
Learn why some data can be expressed using only a broader type, and how you can test for specific kinds of data before using it.
Learn to use guard statements to better manage control flow.
Learn to write nicely structured code that’s easy to read. You’ll do this by properly scoping your constants and variables.
Learn when enumerations are commonly used, how to define an enumeration, and how to work with enumerations using switch statements.
Learn what protocols are, when to use them, and how to write your own. Learn how to enable objects to communicate with each other and how to extend protocols to provide shared functionality across multiple types.
Learn about closures, how to define them, how to use them as function arguments, and how to use some of the common functions that take closures as arguments.
Learn how to define an extension, as well as how and why to use extensions.