Courses /
Introduction to GoLang
Challenge: Constants
Task
Declare and initialize a constant called myConst
with a value of 17
.
index.go
package main
import "fmt"
func main() {
const myConst = 17
fmt.Println(myConst) // Should output 17
}
Everything was clear?
Section 1. Chapter 11
Course Content
Introduction to GoLang
Introduction to GoLang
Challenge: Constants
Task
Declare and initialize a constant called myConst
with a value of 17
.
index.go
package main
import "fmt"
func main() {
const myConst = 17
fmt.Println(myConst) // Should output 17
}
Everything was clear?
Section 1. Chapter 11