Introduction
This challenge aims to test your understanding of constants in Golang.
This tutorial is from open-source community. Access the source code
This challenge aims to test your understanding of constants in Golang.
The problem to be solved is to demonstrate the use of constants in Golang for character, string, boolean, and numeric values.
The Challenge has the following requirements:
const
keyword to declare a constant value.var
statement can.$ go run constant.go
constant
6e+11
600000000000
-0.28470407323754404
In this challenge, you learned how to declare and use constants in Golang. Constants can be of character, string, boolean, and numeric values. Constant expressions perform arithmetic with arbitrary precision. A numeric constant has no type until it's given one, such as by an explicit conversion.