We're a place where coders share, stay up-to-date and grow their careers.
Rust 🦀
numbers.iter().min_by_key(|&num| (num - given_num).abs()).unwrap()
Nice, didn't know Rust had similar syntax to Ruby!
Rust 🦀
Nice, didn't know Rust had similar syntax to Ruby!