Java Explanation and Demonstration of the Following
Variables
Used in project
Operators and Arithmetic
Used in project
Branching / Conditions
There are various different conditional statements used in Javascript. Those statements are: if, else, else if, and switch statements.
- If- Use a block of code if a speficied condition is true.
- Else- Use a block of code if the same condition is false.
- Else if- Use a new condition to test, if the previous condition is false.
- Switch- Use an alternate block of code.
An example of an "if" statement
Repetition (for loop and while loops)
Loops can execute a block of code a number of times. A while loop executes a block of code while a specific condition is true.
An example of a for loop
Comparisons / Logical Operators
Comparison operators are used to determine the equality or difference between variables or values. For example, whether a variable is equal to, not equal to, less than, or greater than another variable.
Logical operators are used to determine the logic between variables or values. For example, having one variable and another variable, or having one variable or another variable.
An example of a logical operator