Challenge: Constants
Свайпніть щоб показати меню
Task
Declare and initialize a constant called myConst with a value of 17.
index.go
1234567package main import "fmt" func main() { ___ fmt.Println(myConst) // Should output 17 }
- Use the
constkeyword for constants. - Assign the value directly when declaring.
- The name should be
myConstand the value 17.
package main
import "fmt"
func main() {
const myConst = 17
fmt.Println(myConst) // Should output 17
}
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 10
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Секція 1. Розділ 10