Intermediate Swift
Q42 / 100

What is a Swift actor?

Correct! Well done.

Incorrect.

The correct answer is B) A reference type that protects its mutable state by serializing access, preventing data races

B

Correct Answer

A reference type that protects its mutable state by serializing access, preventing data races

Explanation

actor BankAccount { var balance: Int } serializes access to balance. External code must await to access actor-isolated state.

Progress
42/100