Challenge: Basics of Variables
Task
Complete the following code so that both myVar1
and myVar2
are successfully declared and initialized.
index.go
123456789package main import "fmt" func main() { ___ myVar1 = 1 myVar2 __ 2 fmt.Println("The value of myVar1 is", myVar1) fmt.Println("The value of myVar2 is", myVar2) }
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 10
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Suggested prompts:
Can you explain the difference between `var` and `:=` in Go?
What happens if I use `:=` outside of a function in Go?
Can you show me how to declare multiple variables in one line in Go?
Awesome!
Completion rate improved to 1.96
Challenge: Basics of Variables
Svep för att visa menyn
Task
Complete the following code so that both myVar1
and myVar2
are successfully declared and initialized.
index.go
123456789package main import "fmt" func main() { ___ myVar1 = 1 myVar2 __ 2 fmt.Println("The value of myVar1 is", myVar1) fmt.Println("The value of myVar2 is", myVar2) }
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 10