Suggested approach: Immutability is baked deep into Swift, and Xcode even warns if var
was used when let
was possible. It’s important because it’s like a programming contract: we’re saying This Thing Should Not Change, so if we try to change it the compiler will refuse.
Estimated difficulty: Easy
See the full list of iOS interview questions
Link copied to your pasteboard.