Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js await in foreach

// Javascript will proceed to call the code that comes AFTER the forEach loop, 
// and then execute the code within the loop. This is because forEach is not 
// async-aware. YOU CANNOT USE AWAIT IN FOREACH. Use a regular for loop instead.
Source by zellwk.com #
 
PREVIOUS NEXT
Tagged: #js #await #foreach
ADD COMMENT
Topic
Name
1+6 =