问题: 为什么失败的回调函数返回值为undefined,then方法生成的Promise的PromiseState的值是resolved
const p = new Promise((resolve,reject)=>{
reject('hello');
})
const h = p.then(value=>{
console.log(value);
// return 'hello'
// return new Promise((resolve,reject)=>{
// resolve('hello world');
// // throw 'Error'
// })
// throw 'New Error';
},reason=>{
console.warn(reason);
})