Đặt biến vào giá trị khác nhau và thử thử .
The 'if . else ' command is another control command pattern that allows JavaScript to execute commands in a more controlled manner.
Syntax
if ( expression ){ Statement ( s ) to be executed if expression is true } else { Statement ( s ) to be executed if expression is false }
Here, JavaScript expressions are evaluated. If the result value is true, the command provided in the if block is executed. If the expression is false, then the given command in the else block is executed.
For example
Try the following example to understand how if . else commands work in JavaScript.
You should read it
- Set command in Windows
- TOP command in SQL
- Setx command in Windows
- Rem command in Windows
- Switch Case command in JavaScript
- CASE statement in SQL Server
- Setlocal command in Windows
- Del command in Windows
- The print command in Windows
- Thread command in windows
- How to Execute the traceroute command
- Loop control in JavaScript
Maybe you are interested
Expressions in SQL
The 4 Basic Steps Of Protein Expression And Purification Explained
Prepare and edit mathematical expressions in Word
Insert and edit mathematical expressions in Word
Create and edit mathematical expressions in Excel
YEAR - The function for the value is the year of a numeric expression in Excel