Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Constants | Getting Started
Introduktion til Golang

bookChallenge: Constants

Task

Declare and initialize a constant called myConst with a value of 17.

index.go

index.go

copy
1234567
package main import "fmt" func main() { ___ fmt.Println(myConst) // Should output 17 }

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 11

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Suggested prompts:

What does the `const` keyword do in Go?

Can I change the value of `myConst` later in the code?

What happens if I try to assign a new value to `myConst`?

Awesome!

Completion rate improved to 1.96

bookChallenge: Constants

Stryg for at vise menuen

Task

Declare and initialize a constant called myConst with a value of 17.

index.go

index.go

copy
1234567
package main import "fmt" func main() { ___ fmt.Println(myConst) // Should output 17 }

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 11
some-alt