We're a place where coders share, stay up-to-date and grow their careers.
In Rust it's quite a simple syntax:
for i in 1..100 { println!("{}", i); }
And for Vec:
Vec
let mut nums: Vec<i32> = Vec::new(); nums.push(1); nums.push(2); nums.push(3); for i in nums { println!("{}", i); }
Same syntax for everything \o/
In Rust it's quite a simple syntax:
And for
Vec
:Same syntax for everything \o/