Using an if-else statement to execute alternate code

So far, the if statements have needed certain conditions to be true for the code block to execute. There is an option that allows you to have an alternate code block execute when the if statement conditions are false.

  • If my conditions are met, execute the following code block, else execute the alternate code block

    Note

    This is very simple concept, just like a little kid saying: "If you give me an ice cream cone, I'll be nice, else I'm going to be naughty."

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.116.51