Skip to content

Commit

Permalink
doc : array slicing examples (vlang#7069)
Browse files Browse the repository at this point in the history
  • Loading branch information
dedesite authored Dec 2, 2020
1 parent dedb8f7 commit ff26f05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ff26f05

Please sign in to comment.