Basic JavaScript language 8: javascript Language

Source: Internet
Author: User

Basic JavaScript language 8: javascript Language

This article summarizes the previous knowledge:


1. JavaScript supports multiple data types, such as numeric, string, and Boolean.


2. In JavaScript, strings are character series enclosed by quotation marks. escape characters can be used to indicate special characters that cannot be directly entered.


3. In JavaScript, variables are used to store data such as values or strings in the memory. in code, variables can be used to access data stored in variables at any time.


4. The variable name cannot contain invalid characters or JavaScript reserved words.


5. JavaScript contains four basic arithmetic operators: Plus (+), minus (-), multiplication (*), and Division (/). Assign values to variables using the equal sign (=) operator, also known as the value assignment operator.


6. Operators have priority.


7. In JavaScript, the string is connected through (+) to form a new string. If the value and character are connected using the + operator, JavaScript will automatically convert the value to a character.


8. JavaScript can automatically convert data types. However, in some cases, forced conversion is required, for example, the previously learned parseInt () and parseFloat (), you can convert the corresponding string to a corresponding value. For a string that cannot be converted, An NaN value is returned.


9. An array is a special variable consisting of multiple array elements. It can maintain multiple different types of data. The index of each array is unique, you can assign values to the specified array element or access the specified element through the index.



Reprinted please indicate the source: http://blog.csdn.net/hai_qing_xu_kong/article/details/41154237 sentiment control _


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.