The use of the if…else conditional operator

The general structure of an if…else statement is as follows:

    if (conditional_expression) {
body_of_task
} else {
body_of_task2
}

The general structure is clearly intuitive to understand. If the conditional expression produces a result that is TRUE, then it will execute the body_of_task section, and if the conditional expression is FALSE, then it will execute the body_of_task2 section. In this recipe, you will implement a small task to implement the if…else statement.

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

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