3 ms·
Good tip, but while it works in this specific case, it isn't generally equivalent. "for of" works on anything that is iterable. This will only work on array-lik
by vkjv 9y ago
Good tip, but while it works in this specific case, it isn't generally equivalent. "for of" works on anything that is iterable. This will only work on array-like objects.
- deleted 9y ago[deleted]
- Klathmon 9y agoAnd the major reason I use for-of is because you can `await` within a loop easily.