Make some rewordings
This commit is contained in:
@@ -244,7 +244,7 @@ The reason that Go is concise because it has some default behaviors.
|
||||
|
||||
### array
|
||||
|
||||
`array` is array obviously, we define them as follows.
|
||||
`array` is an array obviously, we define a one as follows.
|
||||
|
||||
var arr [n]type
|
||||
|
||||
@@ -370,7 +370,7 @@ Attention: `append` will change the array that `slice` points to, and affect oth
|
||||
|
||||
### map
|
||||
|
||||
`map` is behaves like a dictionary in Python. Use the form `map[keyType]valueType` to define it.
|
||||
`map` behaves like a dictionary in Python. Use the form `map[keyType]valueType` to define it.
|
||||
|
||||
Let's see some code. The 'set' and 'get' values in `map` are similar to `slice`, however the index in `slice` can only be of type 'int' while `map` can use much more than that: for example `int`, `string`, or whatever you want. Also, they are all able to use `==` and `!=` to compare values.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user