Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

key value in for loop rust

let vec = vec![1, 2, 3, 4, 5];

for (key, value) in vec.iter().enumerate() {
	println!("{}: {}", key, value);
}
 
PREVIOUS NEXT
Tagged: #key #loop #rust
ADD COMMENT
Topic
Name
8+8 =