Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

async await map

var arr = [1, 2, 3, 4, 5];

var results: number[] = await Promise.all(arr.map(async (item): Promise<number> => {
    await callAsynchronousOperation(item);
    return item + 1;
}));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #async #await #map
ADD COMMENT
Topic
Name
3+7 =