Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Comments in Go | Section
Practice
Projects
Quizzes & Challenges
Quizze
Challenges
/
Getting Started with Go

bookChallenge: Comments in Go

Swipe um das Menü anzuzeigen

Task

Comment out the statement that should be shown and uncomment the statement that needs to be shown in the following code.

index.go

index.go

copy
1234567
package main import "fmt" func main() { fmt.Println("This sentence should not be outputted") //fmt.Println("This sentence should be outputted") }
  1. Use // to comment out a line in Go.
  2. You need to hide the first print statement.
  3. 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")
}
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 8

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Abschnitt 1. Kapitel 8
some-alt