JavaScript Language Basics 8

Source: Internet
Author: User

This article is a summary of the knowledge of the previous study:


1. JavaScript supports a variety of data types, such as numeric types, string types, Boolean types, and so on.


2. In JavaScript, a string is a series of characters enclosed by an argument, which can be used to denote special characters that cannot be entered directly.


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


4. Variable names cannot include certain illegal characters, nor can they include javascript reserved words.


5. There are 4 main arithmetic operators in JavaScript. Add (+), subtract (-), multiply (*), divide (/). Assigning a value to a variable is also called an assignment operator, using the equals (=) operator.


6, the operator has precedence.


7. In JavaScript, a new string is formed by connecting the string together (+). If you connect numbers and characters with the + operator, JavaScript will actively convert the values into characters.


8, JavaScript can be self-active type conversion, but in some cases, it is necessary to use a cast, such as the previous parseint () and parsefloat (), can convert the corresponding string to the corresponding value. Returns a Nan value for a string that cannot be converted.


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



Reprint Please specify source:http://blog.csdn.net/hai_qing_xu_kong/article/details/41154237 Emotional Control _


JavaScript Language Basics 8

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.