Challenge: Comments in Go
Veeg om het menu te tonen
Task
Comment out the statement that should be shown and uncomment the statement that needs to be shown in the following code.
index.go
1234567package main import "fmt" func main() { fmt.Println("This sentence should not be outputted") //fmt.Println("This sentence should be outputted") }
- Use
//to comment out a line in Go. - You need to hide the first print statement.
- Then remove
//from the second one to display it.
package main
import "fmt"
func main() {
//fmt.Println("This sentence should not be outputted")
fmt.Println("This sentence should be outputted")
}
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 8
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Sectie 1. Hoofdstuk 8