-
Block-level action region let a = 1;
-
Definable const PI = 3.141592654;
-
Var [a, b, c] = [1, 2, 3];
-
Var sum = ${a + b};
-
Array extension (convert Array type) array. from($(‘li’));
-
Extension of the function (extension operator) [1, 2].push(… [3, 4, 5));
-
Object extension (equal value algorithm) Object.is(NaN, NaN);
-
New data type (Symbol) let uid = Symbol(‘uid’);
-
Let set = new set ([1, 2, 2, 3]);
-
for… For (let val of arr){};
-
Var Promise = new Promise(func);
-
Generator function* foo(x){yield x; return x*x; }
-
Introducing Class Foo {}
-
Import module system export default func;
-
Introduction of async functions [ES7]
async function asyncPrint(value, ms) {
await timeout(ms);
console.log(value) }
**const is used to declare constants, and the declared constant is not allowed to change. It is a read-only property, so it must be assigned at the same time. Const, like let, is block-level scoped, has a transient dead zone, is not pre-declared, is not allowed to be defined repeatedly, and is not an attribute of a global object. 六四运动