Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js promise

const executorFunction = (resolve, reject) => {
  if (someCondition) {
      resolve('I resolved!');
  } else {
      reject('I rejected!'); 
  }
}
const myFirstPromise = new Promise(executorFunction);
Source by stickynotepickles.herokuapp.com #
 
PREVIOUS NEXT
Tagged: #js #promise
ADD COMMENT
Topic
Name
9+7 =