Saved Bookmarks
| 1. |
What do you understand by the scope of variables in Go? |
|
Answer» The variable scope is DEFINED as the part of the program where the variable can be accessed. EVERY variable is statically scoped (meaning a variable scope can be identified at compile time) in Go which means that the scope is declared at the time of compilation itself. There are two scopes in Go, they are: |
|