Take a serious look at JavaScript

Source: Internet
Author: User
Tags add numbers

I. Basic knowledge

There is no relationship between 1.javascript and Java, just that the Java was too hot, and took a Java name of the Thunder, attracting everyone's attention, so named is JavaScript;

The standard of 2.javascript language is ECMAScript;

3.HTTP is a Hypertext Transfer Protocol, hypertext meaning is not just text, can also be pictures, audio, video can also be transmitted; typically a virtual machine for a Web server, a Web server holds a large number of pages on its own hard disk, when requesting this page, The server will upload the Web page from the hard disk and pass it to the requesting computer via HTTP;

4. When the request is generally going to a specific IP, but we generally do not enter the Internet directly on the IP, but a www.baidu.com, this time there will be DNS to resolve the domain name, resolve to the corresponding host IP, to access;

5.javascript is a weak type of language;

6. Most programming languages are strongly-typed languages, meaning that as long as you use a piece of data, you must explicitly specify what type of data to process, and the use of the data must strictly adhere to the rules of that type. For example, you cannot add numbers and words together;

7. Although JavaScript is a weak language, it means that JavaScript directly infers the type of the language, infers what the user is trying to do, and does it, but sometimes infers the error, so we still have to classify JavaScript as a type of language; We can add strings and numbers directly;

Two. Data types and variables

The 1.javascript supports multiple data types. such as values, strings, booleans, undefined and Nan, as well as objects, arrays, and functions;

2. The string must be in quotation marks, and the front and back quotation marks must be the same, and in the string concatenation there is a rule, "cited in the middle of the", double quotation marks can not put double quotation marks, single quotation mark can not put a single citation (unit is a pair);

3. Variables are the way JavaScript stores variables in memory;

4. Variable names cannot include illegal characters, such as% and & nor can it be a reserved word for JavaScript. Of course, it is not possible to start a number;

5. Before assigning a value to a variable, a declaration must be made;

6. There are three ways to cast a data type. parseint (), parsefloat (), number ();

Take a serious look at JavaScript

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.