编辑代码

//程序运行完成时一定要有输出语句,本工具才能正确展示运行结果。 
let test1 = function(){
    return new Promise(function(resolve, reject){
        setTimeout(() => {
            resolve('张三');
        },3000);
    });
}

test1().then((data) => {
    console.log(data);
});