🔤Swift
Apple's language for apps. It runs on the iPhone, iPad, Mac and Apple Watch.
Think of it like
Think of it like one key for all your doors. The same key opens each Apple device.
Example
Lucy writes a habit tracker for iPhone in Swift. The same code, with small changes, also runs on her iPad.
Why it matters
If you want to build apps for Apple devices, Swift is where you start.
Definition
Example code
swift
let name = "Emma"
print("Hello, \(name)!")
// Hello, Emma!Common mistake
Key takeaways
- 1Apple's own. Made for every Apple device.
- 2Safe by design. Missing values must be handled.
- 3Replaced Objective-C. New Apple code is mostly Swift.