awaitsyntactic sugar in CloudCode tasks and in TypeScript apps.
awaitto handle this.
runfunction should always be
asyncfunction, you also need to
awaiton its response:
belongs-torelationships are also
async. If a chain of
belongs-tolookups are performed, each one requires an
await. For readable code, it is recommended to do each
belongs-tolookup on a separate line. For example:
forloops require specific attention:
someArray.forEachdoes not wait for
asyncfunctions to complete, so it is recommend to use a