Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

promise javascript

/*
Promise is a constructor function, so you need to use the new keyword to 
create one. It takes a function, as its argument, with two parameters - 
resolve and reject. These are methods used to determine the outcome of the
promise. 
The syntax looks like this:
*/

const myPromise = new Promise((resolve, reject) => {

});

Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #promise #javascript
ADD COMMENT
Topic
Name
5+1 =