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/
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In Rust it's quite a simple syntax:
And for
Vec
:Same syntax for everything \o/