JavaScript Chapter III

Source: Internet
Author: User
Tags arithmetic operators

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.