vektor loop karat berdasarkan ukuran

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

for x in data.iter().step_by(2) {
    println!("{}", x)
}
Duco Defiant Dogfish