Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Create A Promise In JavaScript

async function abc() 
{ 	
	const myPromise = new Promise(function(resolve, reject) {
   resolve("hello world");
});
let y= await myPromise;
console.log(y);
/*"hello world*/
	}
Source by learn.coderslang.com #
 
PREVIOUS NEXT
Tagged: #Create #A #Promise #In #JavaScript
ADD COMMENT
Topic
Name
6+7 =