Skip to content
RED SAG Skills
mediumStudy question · answer published in Swift interview questions, so no pointsswiftfunctions

Passing a value to change it

How do you call this function so that score is updated?

func addBonus(_ value: inout Int) {
    value += 10
}
var score = 50
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions