I know about the ampersand as a bit operation but sometimes I see it in front of variable names. What does putting an & in front of variables do?
&
It means that it is an in-out variable. You can do something directly with that variable. It is passed by address, not as a copy.
For example:
var temp = 10 func add(inout a: Int){ a++ } add(inout:&temp) temp // 11