Arrays
How to declare an array
mut ages := [18, 25, 37]
println(ages)[18, 25, 37]mut users := ['vbrazo', 'donnisnoni95', 'Delta456']
println(users)['vbrazo', 'donnisnoni95', 'Delta456']mut users := ['vbrazo', 'donnisnoni95', 'Delta456', 0]~/main.v:2:43: bad array element type `int` instead of `string`Create an empty array
Accessing element of the array
Append a value to an array
Length/size of an array
In operator
Slicing an array
Exercises
Last updated
Was this helpful?