The simple knowledge of JavaScript has been summarized above. You are welcome to exchange and learn. The learning relies on theory + practice. Through the Javascript special training by Mr. Jiang Hao, you have deepened your understanding of the theoretical knowledge, learning new languages is getting more and more familiar with the background. The basic content is so familiar and the syntax is similar. Apart from common points, different knowledge points are just not familiar to us, it is not difficult to strengthen practical practices and break through individual attacks. This means that variables, types, statements (methods), and structures are quite familiar with the previous knowledge (VB, therefore, it is not a new language, and there is not much burden in mind. It is most important to practice more.
Examples:
Javascript isObject-based)Language, almost all things we encounter are objects. Because Javascript isPrototype-based object-oriented language, NoClassSo Javascript is not a real object-oriented programming language.
In C ++ or C #, objects refer to instances of classes or structures. Objects have different attributes and methods, depending on the templates (class) That instantiate them ). This is not the case with JavaScript objects. In JavaScript, an object is only a group of name/value pairs. That is to say, JavaScript objects are treated as dictionaries containing string keywords. We can use the familiar "." (vertex) operator or the "[]" operator to obtain and set the attributes of an object. This is a common method when processing a dictionary. The following code snippet
var userObject = new Object();userObject.lastLoginTime = new Date();alert(userObject.lastLoginTime);
And the following code snippet:
var userObject = {}; // equivalent to new Object()userObject[“lastLoginTime”] = new Date();alert(userObject[“lastLoginTime”]);
Javascript has a lot of knowledge to learn. It's just getting started now. Next, let's take a closer look! Hope!