Initialize an Array in V

Posted by dhonx
Public (Editable by Author)
V
None
Edit
module main

fn main() {
    numbers := [1, 2, 4, 5, 6, 7, 8, 9, 10]
    println(numbers)
    
    friends := ['Alex', 'Nedpals', 'Joe', 'Spytheman']
    println(friends)
    
    mut empty_numbers := []int{}
    empty_numbers << 20
    empty_numbers << 30
    println(empty_numbers)
}