Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ejemplo async await javascript

// Async/Await
const asyncGreeting = async () => 'Greetings';
// Promises
const promiseGreeting = () => new Promise(((resolve) => {
  resolve('Greetings');
}));
asyncGreeting().then(result => console.log(result));
promiseGreeting().then(result => console.log(result));
Source by www.ma-no.org #
 
PREVIOUS NEXT
Tagged: #ejemplo #async #await #javascript
ADD COMMENT
Topic
Name
8+2 =