userName string example for SayHello function

This commit is contained in:
Mert Gör 🇹🇷 2024-01-14 00:33:09 +03:00
parent 9f03e0a62e
commit 220522e1b2
Signed by: hwpplayer1
GPG key ID: 03E547D043AB6C8F
2 changed files with 3 additions and 3 deletions

View file

@ -7,6 +7,6 @@ func Addition(number1 int, number2 int) int{
return total
}
func SayHello() {
fmt.Println("Hello There !")
func SayHello(userName string) {
fmt.Println("Hello There !", userName)
}

View file

@ -17,7 +17,7 @@ func main() {
loops.Demo5()
arrays.Demo4()
slices.Demo2()
functions.SayHello()
functions.SayHello("Mert Gör")
// functions.Addition(2,6)
var total = functions.Addition(3,8)
fmt.Println(total)