4 lines
229 B
Text
4 lines
229 B
Text
|
|
//There is no difference between subroutines and functions:
|
||
|
|
func foo() { } //doesn't explicitly return something (but in fact returns nil)
|
||
|
|
func bar(x) { return x * 2 } //explicitly returns value (keyword "return" can be omitted)
|