You're writing a Go program where you need to define the value of Pi as a constant. Which keyword would you use to declare Pi as a constant?

  • const
  • constant
  • let
  • var
In Go, constants are declared using the 'const' keyword. It's used to declare values that won't change during the execution of the program. Therefore, for declaring Pi as a constant, you'd use the 'const' keyword.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *