1. Type conversion:
It is divided into automatic conversion and casting, which is generally used for casting.
Other types are converted to integers: parseint ();
Other types convert to decimals: parsefloat ();
Determine if it is a valid number type: IsNaN ();
is a number then returns false, not a number to return ture.
Example:
2. Operators:
Math operator : +-*/% + +-;
relational operators : = =! = >= <= > <;
logical operator :&& | | ! ;
Other operators : + = = *=/=%=? ;
3. Statement:
It is generally divided into sequential, branching, and cyclic statements.
(1) Branch statement if:
if (judging condition)
{
Statements that meet the criteria to be executed
}
Else
{
Statements executed when a condition is not met
}
(2) Loop for statement:
For ( initial condition; cyclic condition; state change )
{
Loop body
}
(3) Problem type: exhaustive, iterative.
(4) Two keywords: break and continue.
(5) If you want to output the value of a parameter: the value of the output is "+a+" and "+b"
JavaScript type conversions, operators, statements