Update 02.2.md
Changed few comments text
This commit is contained in:
committed by
James Miranda
parent
a5120b4a48
commit
73575269fd
@@ -32,7 +32,7 @@ Define multiple variables with initial values.
|
||||
Do you think that it's too tedious to define variables use the way above? Don't worry, because the Go team has also found this to be a problem. Therefore if you want to define variables with initial values, we can just omit the variable type, so the code will look like this instead:
|
||||
|
||||
/*
|
||||
Define three variables with type "type", and initialize their values.
|
||||
Define three variables without type "type", and initialize their values.
|
||||
vname1 is v1,vname2 is v2,vname3 is v3
|
||||
*/
|
||||
var vname1, vname2, vname3 = v1, v2, v3
|
||||
@@ -40,7 +40,7 @@ Do you think that it's too tedious to define variables use the way above? Don't
|
||||
Well, I know this is still not simple enough for you. Let's see how we fix it.
|
||||
|
||||
/*
|
||||
Define three variables with type "type", and initialize their values.
|
||||
Define three variables without type "type" and without keyword "var", and initialize their values.
|
||||
vname1 is v1,vname2 is v2,vname3 is v3
|
||||
*/
|
||||
vname1, vname2, vname3 := v1, v2, v3
|
||||
|
||||
Reference in New Issue
Block a user