// inout writes back into the caller's variable func bump(_ n: inout Int) { n += 1 } var x = 10 // & marks the argument as inout at the call site bump(&x) print(x)
pass a variable to be modified