Is it true that short variable declaration := can be used only inside a function?
Answer / Shashank Mohan Shukla
No, the short variable declaration (:=) can be used both in functions and outside of them at package level.
| Is This Answer Correct ? | 0 Yes | 0 No |
How you can write multiline strings in go?
What is default value of a global and local variable in go?
What are the advantages/ benefits of go programming language?
Is “maps” value types?
Explain what a modular programming language is?
How to swap two values in golang?
What is default value of a global variable in go?
What is syntax like in go programming language?
How to write multiple strings in go programming?
What are methods in go?
How can you distribute tasks in golang?
What are the benefits of using go programming?