Rust implements if, else if, and else statements. Else if statements are optional, however, if you use an if, you must contain at least one else statement. The syntax of these statements I have already discussed, however you can also look to the left. The basic setup is: (if/else if/else statement) condition {logic to be executed if fired}
As opposed to C, the condition does not need to enclosed in squares
Loops are control flow statements to be executed until they are broken out of. They do not have conditions. Interestingly, you can assign a variable to be the result of a loop, which I have done in the code to the left. Additionally, you can assign labels to loops, and break out of the label of the loop if you only want to break out of a specific loop(instead of breaking multiple times in the case of nested loops).
These types of loops do not exist in C
While loops are identicial to c, except that, like in if statements, the condition does not need to be included in parenthesis. While loops are identical to loops, except for the fact that it has a condition, and will check the condition at every iteration until the condition is false, which is when the while loop will stop.
Unlike C, for loops are primarily used to iterate over an iterable element.
In this case, I iterate over an array, printing out each value in the array. The syntax is for variable_name in data structure {logic to be executed at each element in data structure}