Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020년 1월.
async function* 키워드는 표현식 내부에서 비동기 제너레이터 함수를 정의하는데 사용됩니다.
함수 이름입니다. 익명 함수의 경우 생략할 수 있습니다. 이름은 함수 본문 내에서만 유효합니다.
paramN Optional함수에 전달되는 인수의 이름입니다. 함수는 최대 255개의 인수를 가질 수 있습니다.
statements Optional함수 본문을 구성하는 구문입니다.
async function* 표현식은 async function* statement과 상당히 유사하며 문법도 거의 동일합니다. 둘의 큰 차이점은 함수 이름인데, async function* 표현식에서는 함수 이름을 생략해 익명 비동기 제너레이터 함수를 만들 수 있습니다. 더 자세한 내용은 함수에 대한 챕터를 참고하세요.
다음 예제는 이름이 없는 비동기 제너레이터 함수를 정의하고 x에 할당한 후, 인수를 제곱한 값을 반환합니다.
| ECMAScript® 2027 Language Specification # sec-async-generator-function-definitions |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.