ECMAScript is the basis for JavaScript implementations
A complete JavaScript implementation consists of the following 3 distinct components:
• Core (ECMAscript)
• Document Object Model (DOM)
• Browser object Model (BOM)
· JavaScript is an object-based
JS has two major data types:
1. Basic data types
2. Custom data type (content exists stack memory, address exists heap memory)
------------------Five basic data types of JS--------------
1.Number includes integers and floating-point numbers
2.String string
3.boolean:true false True is 1 false is 0
4.undefined:undefined If a variable is declared but is assigned to him, the variable type is Undefined and the value is Undefined
5.null:null
------------------Data type Conversions------------------
string and number stitching, converting numbers into strings
Parseint () forcibly converted into integral type
Nan when a string fails to convert to a number
Nan in an expression, the result must be false, except! =
Parsefloat () forcibly converted to floating-point type
Eval () converts a string into an expression
typeof () View data type
------------------operator--------------------
Arithmetic: +-*/%
Increment Decrement: + +--
Unary plus subtraction: =+ =-can convert numbers, strings into numbers
Assignment: =
Logic: = =, = =, >, <, >=, <=,! =, &&, | |,!
Bitwise operation:<< (shift left) >> (right Shift)-(negation) all multiplication are implemented in the bottom binary, so the direct bit operation is very fast
Bitwise AND:& bitwise OR: | | xor or ^
JavaScript data types and operators