SwiftQuiz
#9

Optional-Chained Mutation on a Dictionary

  • optionals
  • dictionaries
Swift 6.3.2 Report an issue

Verified quizzes have their expected answer checked by compiling and running the code with the listed Swift toolchain during the site build.

var d = ["a": [1, 2, 3]]
d["a"]?.append(4)
print(d["a"]!.count)
Hint

What's _modify?

Your answer

What does this program do?