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