fn if_expressions() {
    let number = 7;

    if number < 5 {
        println!("Condition was true");
    } else {
        println!("Condition was false");
    }
}
// Unlike languages such as Ruby and JavaScript, Rust will not automatically try to convert
// non-Boolean types to a Boolean. You must be explicit and always provide if with a Boolean
// as its condition.
Unlike languages such as Ruby and JavaScript, Rust will not automatically try to convert
non-Boolean types to a Boolean. You must be explicit and always provide if with a Boolean
as its condition.
Unlike languages such as Ruby and JavaScript Rust will not automatically try to convert non - Boolean types to a Boolean . You must be explicit and always provide if with a Boolean as its condition .
fn if_expressions() {
    let number = 7;
    if number < 5 {
        println!("Condition was true");
    } else {
        println!("Condition was false");
    }
}
fn if_expressions ( ) { let number = 7 ; if number < 5 { println ! ( " " ) ; } else { println ! ( " " ) ; } }
Unlike languages such as Ruby and JavaScript, Rust will not automatically try to convert
non-Boolean types to a Boolean.
Unlike languages such as Ruby and JavaScript Rust will not automatically try to convert non - Boolean types to a Boolean .