userName string example for SayHello function
This commit is contained in:
parent
9f03e0a62e
commit
220522e1b2
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
2
main.go
2
main.go
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue