Created
March 22, 2023 05:29
-
-
Save Mayankgupta688/4b633c9979de71e5e8703a9aaa0d87da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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