Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JSON Using Its Own Property To Get Promise Value


	 function doSomething() {
	   return new Promise((resolve, reject) => {
	     
		   resolve("rrrrr");	 
	 })

 }
	 


let ky = {x:  async function()
			 {
 
		 return await doSomething();
	 },
	 
	post :  async function()
		 {
		 	console.log(await this.x())
		 }
	 }
 
ky.post();
 
PREVIOUS NEXT
Tagged: #JSON #Using #Its #Own #Property #To #Get #Promise #Value
ADD COMMENT
Topic
Name
5+6 =