What keyword is used to declare a variable in Go?

  • const
  • int
  • let
  • var
In Go, the keyword 'var' is used to declare a variable. It's followed by the variable name and its type. For example, var age int declares a variable named 'age' of type 'int'. 'var' is a fundamental keyword in Go for variable declaration.
Add your answer
Loading...

Leave a comment

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