October 2018
Beginner
180 pages
4h 48m
English
One of the things that makes programs truly useful is the ability for them to make decisions. We can do that in Rust by using an if expression. An if expression looks something like this:
if 3 > 4 { println!("Uh-oh. Three is greater than four.");}else if 3 == 4 { println!("There seems to be something wrong with math.");}else { println!("Three is not greater than or equal to four.");};
What we have here is an expression that shows off all ...
Read now
Unlock full access