Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

async constructor javascript

function asyncRequest(id){
	return new Promise(/*.....*/);
}
class MyClass {
	constructor(async) {
    	(async function() {
          this.city = await asyncRequest(async);
        })();
    }
}
 
PREVIOUS NEXT
Tagged: #async #constructor #javascript
ADD COMMENT
Topic
Name
5+8 =