Just realized ifs can be nested in a different way

343 points Yeet3r__

Since ifs accept almost any expression as a condition and ifs are actually expressions it is possible to write code like this

let a = 13;
if if a == 13 { 10 } else { 0 } > 5 {
    println!("This will be printed");
}