JavaScript Learning Note 1

Source: Internet
Author: User

first, write it in front.

there has been no systematic learning JavaScript, oneself is also small white, a lot of things do not feel, from this chapter, I will take time to learn slowly, good grasp!

Know that learning is a long process, to be impatient, not to accumulate kuibu, not even thousands of miles, do not accumulate small flow, no to become Jianghai! I can't be a genius in my dreams, it's just down to earth

do the stupid bird, clumsy birds have! I hope you and Daniel, point out the lack of learning in this thank you!

Two. Initial knowledge of JavaScript"1" JavaScript is a scripting language designed for interacting with Web pages. Consists of three parts: (1) ECMAScript (ECMA) provides core language features (2) Document Object Model (DOM) provides methods and interfaces for accessing and manipulating Web page content (3) Browser object Model (BOM) provides methods and interfaces for interacting with the browser The three components of the "2" JavaScript are supported by varying degrees in the current five major browsers (IE, FireFox, Chrome, Safari, Opera).  Basic all browsers generally support ECMAScript third edition. However, the support for the DOM and BOM is much worse compared.  "3" JavaScript is a scripting language that can be used in combination with HTML markup languages, and its programs can be written to interpret execution directly in the browser.  JavaScript is an interpreted language (precompilation, execution).  Note: Here is the sequence of JavaScript code execution:let's look at an example:
test (); function test () {alert ('I'm a declarative function .');//declarative Functions} test (); varTest=function () {//value-assigned functionsAlert'I'm an assignment function .');                      } test (); function test () {//declarative FunctionsAlert'I'm a declarative function-redefining'); } test (); 

What is the output of the result?

We can see the results of the output under the Chrome console:

You can see the output of two declarative functions, followed by the output of two assignment functions, so this explains:

JavaScript performs a pre-compilation prior to execution, and the declarative functions are extracted at pre-compilation, prioritized, and the same function

to cover, then execute the assignment function.

three. JavaScript data typeJavaScript consists of five basic data types and reference types. Basic data type: String, number, Boolean, Undefined, Null. Reference type: Object, array, and so on.

JavaScript Learning Note 1

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.