Sometimes you will face a situation where you should check two conditions for a variable(s). You might have had this case before, and you decided to use nested if to solve the problem. Usually, this happens when you want to check a value of a variable is true or false. And when you have to check two variables, you will add more IF under the first condition. For example:
Instead of writing as above, we have a better solution for that. Maybe some of you do not know, Robotiive has two more conditions that can be used to compare two values on one side of the IF condition. Those are && (and) and || (or). The two IF actions from the previous example can be combined into only one IF. So you can reduce script complexity by removing nested IF. The script looks like shown below.