Check out example codes for "if in rust". It will help you in understanding the concepts better.

Code Example 1

if <boolean expression> {
		print!("result from expression is true");
	}
    else {
        print!("result from expression is false");
	}

Learn ReactJs, React Native from akashmittal.com