Plan to complete this note in the following order, for example:
- Java Program Ape's JavaScript Learning notes (concept)
- Java Program Ape's JavaScript Learning notes (2--property copy and inheritance)
- Java Program Ape's JavaScript Learning Note (3--this/call/apply)
- Java Program Ape's JavaScript Learning Note (4--this/closure/getter/setter)
- Java Program Ape's JavaScript Learning Note (5--prototype)
- Java Program Ape's JavaScript Learning Note (6--Object-oriented simulation)
- Java Program Ape's JavaScript Learning notes (7--jquery basic mechanism)
- Java Program Ape's JavaScript learning Note (8--jquery selector)
- Java Program Ape's JavaScript Learning Note (9--jquery tool method)
- Java Program Ape's JavaScript Learning notes (10--jquery-at "class" level)
- Java Program Ape's JavaScript Learning notes (11--jquery-at "object" level)
- Java Program Ape's JavaScript Learning note (12--jquery-extension selector)
- Java Program Ape's JavaScript Learning Note (13--jquery UI)
- Java Program Ape's JavaScript Learning notes (14--extended jquery UI)
each of these may be a few words, perhaps a lengthy speech. The short may be because the concept is difficult to understand, need to slowly digest, long, may be because of the content and water, but not to mention and not.
Now the 1th article: Philosophy.
Author Blog: Http://blog.csdn.net/stationxp
Author Micro-Blog: http://weibo.com/liuhailong2008
Reprint please obtain the author permission
Equality of all beings
JavaScript is a weak type of language. The surface means that the variable type is not checked at the syntactic level. The deep meaning is: in the JavaScript world, sentient beings are equal .
Not only variables, but also arrays, functions, and objects.
Accustomed to C + +, Java, C # Children's shoes, a little accept it?
Yes, all sentient beings are equal, look at the following examples.
<script><strong>var arr = [function () {return this.x*this.y;},56,{x:10,y:16}];</strong></ Script>
In the array arr, the first element (Arr[0]) is a function, and the second element (Arr[1]) is a number. The third element (Arr[2]) is an object.
Are you a little used to it? It means you're not comfortable with JavaScript.
Then look at the following statement:
<script>var arr = [function () {return this.x*this.y;},56,{x:10,y:16}]; It doesn't matter if you don't understand this. Let go of the tube. The following will talk to <strong>arr[2].area = Arr[0];alert (Arr[2].area ());</strong></script>
Well, the 1th article ends here.
Look at the code above see no vainly disobey feeling, feel like vernacular. The purpose of the article was achieved.
The idea is not unified. Can't walk backwards, can't read the code of others. It also doesn't write the native JavaScript code.
Suppose the above code is not accustomed to looking for a few books to see. Find some code to see, slowly get used to it.
Off Topic:
People who are accustomed to the authoritarian society. Accustomed to the emperor, prince, officials, people, slaves strict distinction, to the AIA saw the mayor and the grass people lined up to buy a hamburger surprised to be overwhelmed.
There is no need, there is nothing to be surprised, accustomed to also no different.
Java Program Ape's JavaScript Learning notes (concept)