var textFun = function(){
let self = this;
return new Promise((succ,erro)=>{
setTimeout(()=>{
document.write(self);
succ.call(self,'this is result')
},2000)
})
};
textFun().then((request)=>{
document.write(request);//this is result
})
class Cat{
this.name = 'Tom';
}
const cat = new Cate();
document.write(cate.name)