Mutable for implemented
This commit is contained in:
parent
e9dc7796a8
commit
4968a0b099
|
|
@ -15,4 +15,18 @@ pub fn main() {
|
|||
for i, name in names {
|
||||
println("${i} - ${name}")
|
||||
}
|
||||
|
||||
// ==================================== //
|
||||
|
||||
mut numbers2 := [1,2,3,4,5]
|
||||
|
||||
for mut num in numbers2 {
|
||||
num++
|
||||
}
|
||||
|
||||
println(numbers2)
|
||||
|
||||
// ==================================== //
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue