Say I have an array and I want to perform an async-function on each element of the array.
let a = [x1, x2, x3] // I want to await a.forEach(async (x) => {...
Is there any specific event on which these function will be called ? if yes can be achieved through **closure** in javascript.
right now your function will be called with last value in array when you invoke it