Swift Course

Swift is Apple's language for building apps across iOS, macOS, and beyond — designed from the ground up to be safer than Objective-C, with a compiler that catches a whole category of "it worked on my machine" bugs before your app ever ships. This course takes you from a first script through the idea that makes Swift feel distinctly Swift: optionals.

What you'll learn

The first half is the usual ground every language covers: variables, operators, conditionals, and loops, with Swift's own particular syntax. From there the course turns to what actually sets Swift apart — optionals, which force you to explicitly handle the possibility that a value might be missing, rather than letting a null reference crash your app in production. The second half covers functions, the value-type/reference-type split between structs and classes, Swift's collection types, and protocols, Swift's answer to shared behavior without deep inheritance chains.

Every lesson runs real Swift and shows its exact output, the same way the other compiled-language courses on this site do — read each example closely, then try it yourself in a Swift Playground or online Swift compiler.

Lessons

  1. Introduction
  2. Variables & Data Types
  3. Operators
  4. Conditionals
  5. Loops
  6. Optionals
  7. Functions
  8. Structs & Classes
  9. Collections
  10. Protocols & Extensions
Where to start: begin with Introduction and go in order — Optionals in particular reshapes how you read every lesson after it, so it's worth not skipping ahead to structs or collections first.