Что выведется №12
Условие задачи
swiftimport UIKit
func addScore(_ point: Int) -> Int {
var score = 11
let calculate = { $0 + score }
score = calculate(point)
return calculate(score)
}
print(addScore(10))
swiftimport UIKit
func addScore(_ point: Int) -> Int {
var score = 11
let calculate = { $0 + score }
score = calculate(point)
return calculate(score)
}
print(addScore(10))