Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

async await nodejs

JS
copy
const doSomethingAsync = () => {
  return new Promise(resolve => {
    setTimeout(() => resolve('I did something'), 3000);
  });
};
Source by nodejs.dev #
 
PREVIOUS NEXT
Tagged: #async #await #nodejs
ADD COMMENT
Topic
Name
2+6 =