7
记录一下工作中的零碎收获

promise是javascript引擎内如任务,settime属于浏览器的API所以优先执行primise;

    var r = new Promise(function(resolve, reject){
        console.log("a");
        resolve()
    });
    setTimeout(()=>console.log("d"), 0)
    r.then(() => console.log("c"));
    console.log("b")

流年飞雪
145 声望4 粉丝

coding!!!!