59

ES6 Promise的使用和理解

 5 years ago
source link: https://juejin.im/post/5b605b035188251a90189c61
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
JS的异步 JS语言的执行环境是“单线程”的,即指一次只能完成一件任务;如果有多个任务,那么必须排队,前面一个任务完成,再执行后一个任务,以此类推。这种模式的好处是实现起来比较简单,执行环境相对单纯;坏处是只要有一个任务耗时很长,后面的任务都必须排队等着,会拖

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK