function dateCal(x,y){
console.log(x);
console.log(y);
y().then((e) =>{
console.log(e);
})
}
dateCal(1,() =>Promise.resolve('abc'));
// 1
// [Function]
// abc
第一个是参数,第二个是回调函数,.then表示成功之后执行.then里的代码,.catch表示失败执行.catch里的代码。.catch也可以不写