mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
doc: fix example program for array (#5926)
This commit is contained in:
parent
0f72328d1f
commit
44c280e522
@ -497,7 +497,7 @@ Setting the capacity improves performance of insertions, as it reduces the amoun
|
||||
dynamic arrays:
|
||||
|
||||
```v
|
||||
numbers := []int{ cap: 1000 }
|
||||
mut numbers := []int{ cap: 1000 }
|
||||
// Now adding new elements is as efficient as setting them directly
|
||||
for i in 0 .. 1000 {
|
||||
numbers << i
|
||||
|
Loading…
Reference in New Issue
Block a user