Skip to content

Instantly share code, notes, and snippets.

@kadiralev1
Created November 14, 2019 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadiralev1/248f98e08521a83b00d5ae4e1a39ec87 to your computer and use it in GitHub Desktop.
Save kadiralev1/248f98e08521a83b00d5ae4e1a39ec87 to your computer and use it in GitHub Desktop.
func doubleInPlace(number: inout Int) {
number *= 2
}
var myNumber = 10
doubleInPlace(number: &myNumber)
print(myNumber)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment