The core language feature of JavaScript is defined in the form of a pseudo-language called ECMAScript. ECMAScript contains all the basic syntax, operators, data types, and the necessary objects to complete basic computational tasks.
The basic elements in ECMAScript are as follows:
- The basic data types in ECMAScript include Undefined, Null, Boolean, number, and string.
- Unlike other languages, ECMAScript does not define separate data types for integer and floating-point values, and the number type can be used to represent all values.
- ECMAScript also has a complex data type, the object type, which is the data type of all the objects in the language.
- Strict mode imposes restrictions on the error-prone areas of the language.
- ECMAScript provides many of the same basic operators as C and other C languages, including arithmetic operators, Boolean operators, relational operators, equality operators, and copy operators.
- ECMAScript draws on many process control statements from other languages, such as the IF statement, the for statement, and the switch statement.
The functions in ECMAScript differ in many ways from functions in other languages.
- You do not need to specify a function's return value, because any ECMAScript function can return any value at any time.
- In fact, a function that does not specify a return value returns a special undefined value.
- There is also no concept of a function signature in ECMAScript, because its function parameters are passed in a form of an array of 0 or more values.
- You can pass any number of arguments to the ECMAScript function, and you can access them through the arguments object.
- The ECMAScript function cannot be overloaded because there are no attributes for function signatures.
JavaScript Chapter III