About 83,000 results
Open links in new tab
  1. What are asynchronous functions in JavaScript? What is "async" …

    JavaScript has an asynchronous model. Whenever an asynchronous action is completed you often want to execute some code afterwards. First callbacks were often used to solve this …

  2. How can I create an Asynchronous function in Javascript?

    The .animate() mathod uses a callback. Animate will call the callback when the animation is complete. If you need the same behaviour of .animate() what you need is a callback (called by …

  3. Call An Asynchronous Javascript Function Synchronously

    Feb 3, 2012 · JavaScript function to make asynchronous code blocking. 0. NodeJS, BlueBird - Wait for Promise to Resolve ...

  4. javascript - Proper way to wait for one function to finish before ...

    Feb 3, 2014 · THEN, when the asynchronous call completes, after several spins of the main JavaScript thread, have it call function 3. This guarantees the order . For example, with ajax, …

  5. javascript - What is the difference between synchronous and ...

    May 2, 2013 · Calling the callback registered with an asynchronous operation is how JavaScript run time returns the outcome of the operation when it is done. A simple method of knowing …

  6. How to calculate the execution time of an async function in …

    Aug 18, 2017 · I would like to calculate how long an async function (async/await) is taking in JavaScript. One could do: const asyncFunc = async function {}; const before = Date.now(); …

  7. javascript - How to know if a function is async? - Stack Overflow

    If you need a helper function to determine if a value is an asynchronous function, without invoking it, or if a value is a function that returns a Promise, you have arrived at the right post. In this …

  8. How to synchronously call a set of functions in javascript

    Jun 8, 2016 · You should change each function to return a Promise, which will allow your final function to become: function runner() { return …

  9. How to await an async call in JavaScript in a synchronous function?

    Feb 1, 2017 · var btn = document.getElementById("btn"); btn.addEventListener("click", handler, false); // handler can't be async function handler(e) { console.log("handler ...

  10. javascript - How to return values from async functions using async ...

    Apr 20, 2018 · async function callAsync() { var x = await getData(); console.log(x); } callAsync(); (I named the function for sake of clarity, but in this scenario, one would rather use an …