Objective
Long ago, it was common to think that JavaScript was doing some web effects and dealing with events.
There are some old stubborn ones around me. NET programmers are still stuck in this perception, and they feel that no backend development is sure to build the system.
The combination of programming language and technology is like a man marrying several chicks.
In the old age,. NET is a grand, JavaScript is side room.
The house is "the Lord of the Harem", not only to keep the family, but also to give you a baby, Eva will inherit the family.
Side room is not so fortunate, in the "harem" there is no status, although food and clothing without worry, but can not manage family affairs, the birth of the baby can only be regarded as concubines, did not inherit the right to business.
But, the time changes, the family business is bigger, the family also branches scattered leaves, the men have become the mouth of the "master."
Career so stable, master too boring, lust is human instinct, master to find some "sexual interest" to meet their own.
The big house for the family Labor, years in her face left a lot of traces, Master has gradually lost interest in her;
Side room leisurely, family affairs without her worry, daily affairs is to dress up themselves, to maintain their youthful luster.
Master this pair of lustful eyes and stared at the side room, so side room finally superior, the upper is of course the status of Ascension, not only can meddle in the family's career, but also let their own EVA management part of the business.
(PS: This example has an inappropriate place, JavaScript appears earlier than. net)
With the popularization and rapid development of the Internet, JavaScript can do more and more things.
What can it do?
- It can do web-rich client applications, combined with HTML5 and CSS3 it can achieve complex front-end interaction
- It can be used as a server-side application, such as the current very popular node. JS Framework
- It can be used as a mobile app, such as an app that you can create iOS and Android platforms via PhoneGap or Titianium.
JavaScript can do a lot of other things, and JavaScript is almost ubiquitous.
Now we can say that, whether it's a PC, a smartphone, or a smart TV, all the devices that provide the JavaScript runtime can do something with JavaScript.
Type overview
The title reveals that this is another series of articles about JavaScript object-oriented programming.
Before formally starting JavaScript object-oriented programming, we need to have a thorough understanding of the type of JavaScript.
A lot. NET programmers can understand the types of data in C #, but do not fully understand the data types of JavaScript.
JavaScript is a weak type of language, although its type is not as diverse as C #, but it is more flexible.
For example: In C #, 1 is the type int, and true is the bool type, and 1 and true are not directly comparable.
In JavaScript, numbers are not just numbers, they can sometimes be used as logical expressions for conditional judgments.
1; if (count) { Console.log ("hello!");}
In C #, the compiler does not allow you to do this, the following code is not compiled at all.
1; if (count) { Console.WriteLine ("hello!");}
Formally because of this flexibility, make some. NET programmers have a lot of confusion when it comes to writing JavaScript code.
Today we begin this series of journeys with this confusion.
Play to JavaScript oop[0]--base type