What is 'Nested If'?

Asked by emeka_nwankwo · 6 months ago

1 Answer

21
amorebise · 6 months ago Top Answer

This is when you put an 'if' statement inside another 'if'. Think: "If it is Saturday, if I have finished my chores, then I can go play football."

The second condition only matters if the first one is true. Be careful not to go too deep, or your code will start to look like a messy plate of spaghetti!

Log in to add a comment.