Swift Optionals (e.g. String?) are used to:

  1. Import frameworks
  2. Safely represent a value that may be missing (nil)
  3. Declare constants
  4. Make code run faster
Answer

B) Safely represent a value that may be missing (nil)

Optionals force developers to handle nil values safely.

Computer Science MCQ · More iOS: Architecture and Framework MCQs · Practise