46 ms·
I'd just write: for(var i in list) { someAsyncCallThatNeedsTheRightIndexedElement(list[i]) } though I usually try to avoid for loops with `.map` or `
by olalonde 10y ago
I'd just write:
for(var i in list) {
someAsyncCallThatNeedsTheRightIndexedElement(list[i])
}
though I usually try to avoid for loops with `.map` or `.forEach`:
list.forEach(someAsyncCallThatNeedsTheRightIndexedElement)
The IIFE in your code is unnecessary and I would thus probably side with the too clever camp in this case.