Objective
Process Control statement:
In the process of executing a program, the order of execution of each statement has a direct effect on the result of the program. That is to say, the process of the program has a direct impact on the running
Here is a typical decision to make if ... Else the general form of the structure is used in most programming languages:
If statement:
The If statement consists of a Boolean expression followed by one or more statements. Grammar:
Syntax for an IF
1. Process Control StatementsIn the process of executing a program, the order of execution of each statement has a direct effect on the result of the program. In other words, the process of the program directly affects the results of the operation.
When programming, you often need to check a series of conditions and decide what measures to take accordingly. In Python, the if statement enables us to check the current state of the program and take corresponding measures accordingly. 5.1 The
One way to "make something happen" is to evaluate an expression with a side effect. Injected assignments and function calls these expressions with side-effects can be used as separate statements, and this expression is also called an expression
When programming, you often need to check a set of conditions and decide what action to take accordingly. In Python, the IF statement allows us to examine the current state of the program and take appropriate action accordingly.
5.1 A simple
In front of you to explain a multi-choice ElseIf statement, although this statement can make a variety of judgments, but when used, need to write a lot of if statements, to our program readability inconvenience, in order to avoid the IF statement
Conclusion : A function in JS is: the Boolean (value) function converts a value to the corresponding Boolean value.When value is the following values are true:1. Any non-empty string. 2. Arbitrary non-0 digitsAnd when value is the following value
Town Field Poem:The Pure Heart sentiment wisdom language, does not have the world name and the benefit. Learn water under the hundred rivers, give up arrogant slow meaning.Learn to have a small return to feed root, willing to cast a conscience blog.
An If statementifThe statement is used to test a condition, and if the condition is true, we run a block of statements (called if-blocks ), that is, there is only one if judgment, and when it is true, run a statement, otherwise it will not runThe IF
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.