Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Second Simplest Promise Example


	 
	async  function send()
	 {
	 
	
		let hw  = await new Promise((resolve)=>{


			setTimeout(resolve("HELLO WORLD"), 1000);
		})

 



console.log(hw);
}
/*basically resolve() is 'giving' you the value*/
 
PREVIOUS NEXT
Tagged: #Second #Simplest #Promise #Example
ADD COMMENT
Topic
Name
2+5 =