A

Admin • 832.27K Points
Coach

Q. What does the `mutating` keyword do in Swift?

  • (A) Allows a struct method to modify its properties
  • (B) Makes a function constant
  • (C) Prevents changes to variables
  • (D) Enables inheritance
  • Correct Answer - Option(A)
  • Views: 23
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin

`mutating` allows value types like structs to modify their properties within methods.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.