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 stickynotepickles.herokuapp.com #
 
PREVIOUS NEXT
Tagged: #Create #A #Promise #In #JavaScript
ADD COMMENT
Topic
Name
7+8 =