← iOS Development (Swift) learning path
iOS Development (Swift) · Module 2 of 10

Swift basics

Learn constants, variables, types and control flow in Swift.

📖 Key ideas

  1. let declares a constant; var a variable.
  2. Type inference: let age = 21 is Int.
  3. String interpolation: "Hi \(name)".
  4. Control flow: if, switch, for-in, while.
  5. Swift is type-safe and fast.
💡 Real-life example: Swift is a strict but friendly teacher: catches mistakes early and explains them.
letConstant declaration
varVariable declaration
Type inferenceCompiler works out types
Interpolation\(value) inside strings