What are the new features of Es6?

Arrow operator =>;


Support for class class (constructor);


Indefinite parameters ... x; let and const keywords;

for of traversal


Module support import;


The processing mode of the promise asynchronous function (pending waiting; resolve returns success, reject returns failure);


Template literals (1 button on the left), used to be connected in series with +


Destructuring assignment
In ES6, you can use destructuring to extract values ​​from arrays and objects and assign them to unique variables

const point = [10, 25, -34];
const [x, y, z] = point;
console.log(x, y, z);

The spread operator
(represented by three consecutive dots (...)) is a new concept in ES6 that enables you to expand a literal object into multiple elements

 

 

Published 203 original articles · praised 8 · 10,000+ views

Guess you like

Origin blog.csdn.net/z591102/article/details/105575439