When passing a class or primitive type into a function, any change made in the function to the parameter will be reflected outside of the class. This is basically the same t
when use inout parameter swift 4.0 Work
class ViewController: UIViewController { var total:Int = 100 override func viewDidLoad() { super.viewDidLoad() self.paramTotal(total1: &total) } func paramTotal(total1 :inout Int) { total1 = 111 print("Total1 ==> \(total1)") print("Total ==> \(total)") } }