Promise/Async/Generator
Simple callback difficult error handling because try...catch don’t work getJSON('xx.json', (err, data) => { if (err) console.log('err') // do something }) sequences of steps, leading to pyramid of doom getJSON('xx.json', (err, data) => { if (err) console.log('err') invite(data[0].name, (err, data) => { if (err) console.log('err') // do something }) }) waiting until all the parallel tasks are done let person, item, getPerson('xx', (err, data) => { if (err) console.log('err') person