3 ms·
Someone already commented that you can use `[...iterable]` to convert any iterable into an array, but if you're doing this just to call forEach on it then it's
by TheAceOfHearts 5y ago
Someone already commented that you can use `[...iterable]` to convert any iterable into an array, but if you're doing this just to call forEach on it then it's probably better to use for-of in order to avoid allocating an additional array:
for (const item of iterable) {
// do forEach stuff here
}