Région de recherche :

Date :

https://developer.mozilla.org › ... › docs › Web › JavaScript › Reference › Statements › async_function

async function - JavaScript | MDN

Learn how to use async functions to write asynchronous, promise-based code in a cleaner style with await expressions. See syntax, description, examples, and browser compatibility of async functions.

https://developer.mozilla.org › fr › docs › Web › JavaScript › Reference › Statements › async_function

async function - JavaScript | MDN

Une fonction asynchrone est une fonction précédée par le mot-clé async, et qui peut contenir le mot-clé await. async et await permettent un comportement asynchrone, basé sur une promesse (Promise), écrite de façon simple, et évitant de configurer explicitement les chaînes de promesse.

https://www.w3schools.com › Js › js_async.asp

JavaScript Async - W3Schools

Learn how to use async and await keywords to write promises easier in JavaScript. See examples of async functions, await syntax, and browser support.

https://javascript.info › async-await

Async/await - The Modern JavaScript Tutorial

Let’s start with the async keyword. It can be placed before a function, like this: async function f() { return 1; } The word “async” before a function means one simple thing: a function always returns a promise. Other values are wrapped in a resolved promise automatically.

https://developer.mozilla.org › en-US › docs › Learn › JavaScript › Asynchronous › Introducing

Introducing asynchronous JavaScript - MDN Web Docs

Learn what asynchronous programming is, why we need it, and how it differs from synchronous programming in JavaScript. Explore examples of asynchronous functions, such as fetch(), getUserMedia(), and showOpenFilePicker(), and how they enable your program to be responsive to other events.

https://www.javascripttutorial.net › javascript-async-await

JavaScript Async / Await: Asynchronous JavaScript

In this tutorial, you will learn a new syntax to write asynchronous code by using JavaScript async/ await keywords.

https://fr.javascript.info › async-await

Async/await - JavaScript

Le mot “async” devant une fonction signifie une chose simple : une fonction renvoie toujours une promesse. Les autres valeurs sont enveloppées dans une promesse résolue automatiquement. Par exemple, cette fonction renvoie une promesse résolue avec le résultat 1 ; testons-la: async function f() { return 1; } f().then(alert); // 1.

https://javascript.info › async

Promises, async/await - The Modern JavaScript Tutorial

Promises, async/await. Introduction: callbacks. Promise. Promises chaining. Error handling with promises. Promise API. Promisification. Microtasks. Async/await.

https://devdoc.net › ... › en-US › docs › Web › JavaScript › Reference › Statements › async_function.html

async function - JavaScript | MDN

The purpose of async / await functions is to simplify the behavior of using promises synchronously and to perform some behavior on a group of Promises. Just as Promises are similar to structured callbacks, async / await is similar to combining generators and promises.

https://web.dev › articles › async-functions

Async functions: making promises friendly - web.dev

Async functions work like this: async function myFirstAsyncFunction() { try { const fulfilledValue = await promise; } catch (rejectedValue) { // … } } If you use the async keyword before a function definition, you can then use await within the function.