Treehouse Intermediate Course - Part 11 (Closures 2)
So, as expected, I had to miss two days. But I'm back! I have a bit of time this evening to carry on with closures - certainly, completing the first part of the Treehouse track. So far, it's all been fine and I haven't found any issues. OK, let's go! Start Time - 18:56 func gameCounter() -> IntegerFunction { var localCounter = 0 func increment( _ i: Int ) { print ( "Integer passed in: \ ( i )" ) } return increment } So just a reminder of scope. The localCounter variable is local as it is inside the body of the method; it can't be used outside that function. *Paused at 19:03 (not able to concentrate - need to come back to this to take it in properly.) *Continued at 20:11 The increment function now has localCounter += inside it. It can use the localCounter var as it is defi...