Introduction to JavaScript

Source: Internet
Author: User

Infi-chu:

http://www.cnblogs.com/Infi-chu/

First, JavaScript introduction:

JavaScript was originally a scripting language, but as the web era evolved, he became a web-oriented programming language, now a veritable web-oriented programming language. Most Web sites are developed using JavaScript, and all browsers contain JavaScript interpreters.

Second, JavaScript features:

1. High-end

2. The dynamic

3. Weak type

4. Robustness

5. High efficiency

6. Versatility

Third, the initial JavaScript (some simple examples):

Declare the variable var x through the var keyword;    Declare variable//pass = assign value to variable x=0;    Multiple data types of assignment//javascript x=11;   Plastic     x=0.5;    Floating-point   x= "Nice to meet you~";   String x= ' nice to meet you~ ';    Single-Quote double-quote usage is similar to pythonx=true;    Boolean type x=null;    Special value, NULL x=undefined    //with NULL//Create object, similar to dictionary in python var test={    A: ' Hello ';    B: ' Hi '};test.a;    Accessing object Properties test["B"];    Access Object Properties test.c= ' OK ';    Create a new attribute by assigning//create an array, equivalent to the Listvar test1=[2,5,6,9];//common operation symbol in Python//+-*/    subtraction var d=1;d++;d-;d +=1;    D = d+1d *=2;    D = d*2/*==   equals = =   Not equal to <   less than > greater than <= less than or equal to   >= greater than or equal to   *///logical operator (q==1) && ( p==2)    //&& and (q==1) | | (p==2)    //|| Or! (3==2)    ! Non-//function test2 (x) {    return x+1;  } Y=2;test2 (2)    //result is 2+1=3

Note: JavaScript cuts the score number!

Introduction to JavaScript

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.