mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
doc : array slicing examples (#7069)
This commit is contained in:
parent
dedb8f7e41
commit
ff26f0539c
@ -521,6 +521,8 @@ println(nums[1]) // "2"
|
||||
nums[1] = 5
|
||||
println(nums) // "[1, 5, 3]"
|
||||
|
||||
println(nums[0..2]) // slicing gives an array "[1, 5]"
|
||||
|
||||
println(nums.len) // "3"
|
||||
nums = [] // The array is now empty
|
||||
println(nums.len) // "0"
|
||||
|
Loading…
Reference in New Issue
Block a user