阿神2017-05-16 13:25:10
function test(){
var myFirstPromise = new Promise(function(resolve, reject){
console.log('in promise')
resolve("成功!"); //代码正常执行!
});
return myFirstPromise
}
test().then(function(successMessage){
console.log("Yay! " + successMessage);
});