doc: fix example program for array (#5926)

pull/5924/head
Koki Nishihara 2020-07-22 23:28:09 +09:00 committed by GitHub
parent 0f72328d1f
commit 44c280e522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ Setting the capacity improves performance of insertions, as it reduces the amoun
dynamic arrays: dynamic arrays:
```v ```v
numbers := []int{ cap: 1000 } mut numbers := []int{ cap: 1000 }
// Now adding new elements is as efficient as setting them directly // Now adding new elements is as efficient as setting them directly
for i in 0 .. 1000 { for i in 0 .. 1000 {
numbers << i numbers << i