Tag: ES6

0

Traverse objects and arrays

Traverse the object: for…in loops through the object’s own and inherited enumerable properties Loops through the object’s own and inherited enumerable properties (excluding Symbol properties). 123

0

Promise Advanced

Promise.all() and Promise.allSettled() Promise.all and Promise.allSettled are both methods for handling multiple concurrent Promises, but they differ in how they handle successful and failed Promis

0

Promise basic

Promise: A new solution for asynchronous programming introduced in ES6. Promises are mainly to solve the previous problem of callback hell. Promise is a constructor that encapsulates an asynchronous

0

Spread operator

Spread operator … (array) The spread operator can split an array or array-like structure into a comma-separated sequence of arguments. 12const arr = [1, 2, 3];console.log(...arr) //result is 1 2 3

0

Arrow Functions, Rest params

Extensions to Functions: Arrow Functions => 123let fn = function(m){return m}; //ordinary functionlet fn = (m) => {return m} //complete writing of arrow functionlet fn

0

Let, Const, Destructuring assignment

Declares variable a by ‘let’ let is the new way to declare variables in ES6, replacing var. 1234let a;let b, c, d;let e = 100;let f = 521, g = 'iloveyou', h = []; var: allows repeated de