Home > Web Front-end > JS Tutorial > body text

Javascript - ES6 practical course video related introduction

巴扎黑
Release: 2017-08-24 12:00:55
Original
1500 people have browsed it

JavaScriptES6 is the next version of JavaScript, and it is also the latest version. It adds many new features based on ES5, such as: default parameters, template expressions, multi-line strings, unpacking expressions, Improved object expressions, arrow functions =>, Promise, block-scoped let and const, classes, modularity, and more.

"Javascript - ES6 Practical Video Course" explains the ES6 features that are supported by the running environment, while ignoring the unsupported features. With the gradual support of ES6 running environments such as Node.js, babel and browsers, The content of this set of video courses will also be supplemented. The advantage of this kind of teaching is that it allows students to directly apply the new ES6 features in development and avoids the confusion caused by learning unsupported features.

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

The difficulties you may encounter when learning Javascript - ES6 course are: When learning some new features, such as classes, new is the command to generate instances from the constructor. ES6 introduced a new.target property for the new command, which (in the constructor) returns the constructor that the new command acts on. If the constructor is not called via the new command, new.target will return undefined, so this property can be used to determine how the constructor was called.

function Person(name) {  
    if(new.target !== undefined) {  
        this.name = name;  
    } else {  
        throw new Error(' 必须使用 new 生成实例 ');  
    }  
}  
//  另一种写法  
function Person(name) {  
    if(new.target === Person) {  
        this.name = name;  
    } else {  
        throw new Error(' 必须使用 new 生成实例 ');  
    }  
}  
var person = new Person(' 张三 '); //  正确  
var notAPerson = Person.call(person, ' 张三 '); //  报错
Copy after login

The teacher's teaching style of this course is relatively rigorous, and the content explanation is relatively concise, detailed and comprehensive. After studying this video, I believe everyone can master the relevant knowledge points of JavaScriptES6.

The above is the detailed content of Javascript - ES6 practical course video related introduction. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template