JSFiddle - React, Tailwind, and code Playground

by QW01_01

JavaScript

class Test{
	constructor(){
  	this.anybodyProperty = 0;
  }
  anybodyName() {
  	return new Promise(resolve => {
    	setTimeout(() => {
      	this.anybodyProperty = 1;
        resolve(this.anybodyProperty);
      }, 1000);
    });  	
  }
}

!async function (){

	console.log(await (new Test().anybodyName()));

}()