1. Various operators
(1) Arithmetic operators
+-*/% ()
(2) Self-increment decrement operator
a++ ++a A----a
If it is added first, a plus after operation will be given
If it is a post-add, it will be given a plus after the first operation.
(3) Logical operators
&& | | Or! Non -
(4) Relational operators (comparison operators)
> <, >=, <=, = =, = =,! =,!=== (not congruent)
= = Judge content, do not care about type
= = = Care about both content and type of care
(5) Assignment operator
= right-to-left view
(6) Comma operator
,
2. Conversion of data types
(1) Forced type conversion
By using Number:number (), parseint (), parsefloat ()
String:. ToString (), String ()
Boolean:boolean ()
To convert the data to the data type of the object
(2) Implicit conversion
Number:+a; A-B; a*b,a/1,a%1 (Note: A is a string type and B is number)
String:a+ "";
boolean:!! A
All the data in JavaScript can be turned into a Boolean,
Only False,0,nan, "", undefined will turn to False when the Boolean conversion is performed,
The rest is true, including "false"
3. Process Control
(1) if
If-else
If-elseif-else
(2) switch-case-(default):
To judge a series of conditions
JavaScript Basics (ii)