← iOS Development (Swift) learning pathiOS Development (Swift) · Module 2 of 10
Swift basics
Learn constants, variables, types and control flow in Swift.
📖 Key ideas
- let declares a constant; var a variable.
- Type inference: let age = 21 is Int.
- String interpolation: "Hi \(name)".
- Control flow: if, switch, for-in, while.
- 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