1Async arrow functions look like this:
2
3const foo = async () => {
4 // do something
5}
6Async arrow functions look like this for a single argument passed to it:
7
8const foo = async evt => {
9 // do something with evt
10}
11Async arrow functions look like this for multiple arguments passed to it:
12
13const foo = async (evt, callback) => {
14 // do something with evt
15 // return response with callback
16}
17The anonymous form works as well:
18
19const foo = async function() {
20 // do something
21}
22An async function declaration looks like this:
23
24async function foo() {
25 // do something
26}
27Using async function in a callback:
28
29const foo = event.onCall(async () => {
30 // do something
31})