Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Created March 22, 2023 05:29
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 Mayankgupta688/4b633c9979de71e5e8703a9aaa0d87da to your computer and use it in GitHub Desktop.
Save Mayankgupta688/4b633c9979de71e5e8703a9aaa0d87da to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
variableOne := 10
variableTwo := 20
updateData(variableOne, variableTwo)
fmt.Println("Value of variable one in main Function is", variableOne)
}
func updateData(inputData ...int) {
inputData[0] = 100
inputData[1] = 200
fmt.Println("Updated Value of variable one in getData Function is", inputData[0])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment