Home >Web Front-end >JS Tutorial >Shangxuetang javascript video tutorial

Shangxuetang javascript video tutorial

巴扎黑
巴扎黑Original
2017-08-24 18:10:572829browse

javascript! is a very powerful scripting language with a very wide range of applications. It is also necessary for every web developer to learn javascript well. "Shang Xuetang JavaScript Video Tutorial Season 1" explains in detail the various knowledge points of javascript. Key points include advanced function concepts, prototype concepts, interface concepts, single concepts, and a detailed explanation of JavaScript design patterns.

Shangxuetang javascript video tutorial

Video playback address: http://www.php.cn/course/503.html

The difficulty of this video is Object-oriented programming

One of the hallmarks of an object-oriented language is that it has the concept of a class, abstracts the public properties and methods of instance objects, and can create any number of instance objects based on classes. Generally, it has the functions of encapsulation, inheritance, multiple Characteristics of state! However, objects in JS are different from objects in pure object-oriented languages. The ECMA standard defines objects in JS: a collection of unordered attributes, whose attributes can include basic values, objects or functions. It can be simply understood that a JS object is a set of unordered values, in which the properties or methods have a name, and the mapped value can be accessed according to this name (the value can be a basic value/object/method).

1. Understanding the object:

The first one: Based on the Object object

var person = new Object();
person.name = 'My Name';
person.age = 18;
person.getName = function(){
    return this.name;
}

The second one: Object literal method (clearly searches for the properties and methods contained in the object )

var person = {
    name : 'My name',
    age : 18,
    getName : function(){
        return this.name;
    }
}

 JS objects can use the '.' operator to dynamically expand their properties, and you can use the 'delete' operator or set the property value to 'undefined' to delete properties. As follows:

person.newAtt=’new Attr’;//添加属性
alert(person.newAtt);//new Attr
delete person.age;
alert(person.age);//undefined(删除属性后值为undefined);

The teacher who lectures in this video explains things in simple and easy-to-understand terms, with clear organization, layer-by-layer analysis, interlocking links, rigorous argumentation, and rigorous structure. He uses the logical power of thinking to attract students' attention, and uses reason to control the classroom teaching process. . When explaining, analyzing, and demonstrating, the thinking should be clear; when asking questions, discussing, and practicing, the students' psychological characteristics and receptive abilities should be taken into consideration according to the students' actual situation.

The above is the detailed content of Shangxuetang javascript video tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn