fix array definition

This commit is contained in:
pasali
2015-01-18 16:33:32 +02:00
committed by James Miranda
parent bc2756916c
commit 729ae5df0f

View File

@@ -295,7 +295,7 @@ Then we define a `slice`, and initialize its data.
`slice` can redefine existing slices or arrays. `slice` uses `array[i:j]` to slice, where `i` is the start index and `j` is end index, but notice that `array[j]` will not be sliced since the length of the slice is `j-i`.
// define a slice with 10 elements whose types are bytes
// define an array with 10 elements whose types are bytes
var ar = [10]byte {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'}
// define two slices with type []byte