Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

return then javascript

const promise1 = new Promise((resolve, reject) => {
  resolve('Success!');
});

promise1.then((value) => {
  console.log(value);
  // expected output: "Success!"
});
 
PREVIOUS NEXT
Tagged: #return #javascript
ADD COMMENT
Topic
Name
5+4 =