Js | Each call to then returns a newly created promise object

Example

	var aPromise = new Promise((reslove)=>{
        reslove(100)
    })

    var thePromise = aPromise.then((value)=>{
        console.log(value);
    })

    var threePromise = thePromise.catch((error)=>{
        console.log(error);
    })


    console.log(aPromise !== thePromise);  //=>true
    console.log(thePromise !== threePromise);  //=>true

Js | Each call to then returns a newly created promise object

上一篇:OCP-052考试题库汇总(30)-CUUG内部解答版


下一篇:RabbitMQ结合JavaAPI简单使用