You can decide on the trade-off between bundle size and developer convenience. ![]() for.of requires iterators, and some browsers require a polyfill for iterators, and that polyfill is quite large. However it is recommended by the Airbnb style guide because it can reduce the browser bundle size. This has pretty much the same behaviour as the for.of above, but is slightly harder to read. (We are using the accumulator a not as a total or a summary, but just as a way to pass the promise from the previous item's callback to the next item's callback, so that we can wait for the previous item to finish being processed.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |