JS Comment Syntax:
Single-line Comment://The later content will be commented
Multiline Comment:/* Intermediate content is commented */
Output syntax: alert (); Output content confirm (); Output selectable content prompt (); Output and accept user input
Embed JS code: Theoretically, any location on the page can be embedded but generally we want to embed the JS code in the lowest part of the page
Inline <script type= "Text/javascript" ></script>
External <script type= "file Address" ></script>
Basic knowledge of the program:
1) All characters Embox is English half angle
2) In most cases, add a semicolon after each statement ends
3) Add a newline after each code ends
4) Pre-and post-process echoes
Strongly typed syntax: A data type must be defined on transfer
Weakly typed syntax: No data types are defined and can be converted automatically
Basic data type: integer: int single precision decimal: float double decimal: Double decimal: Decimal Currency: Money
Character: Char string: String Boolean: BOOL (True True False) DateTime type Datetame
Variable:
All variable definitions are defined with VAR
Type conversions:
Other types are converted to integers: parseint ();
Other types convert to decimals: parsefloat ();
Operator:
Math operators: +-*/% + Good to do string stitching
Relational operators: = =! = > >= < <=
Logical operator:&& | | !
Other operators: + = = *=/=%=?: (condition?) satisfies the condition "OK": The condition "no" is not satisfied)
JavaScript Basic Knowledge Collation