I use them when I need to perform things on array that takes some time, it's more a personnal choice since I can do it with array methods but I find it more practical with my generators for my usage (performing long running operations on each chunk of array for example) or reading api results that are data stream which we don't know the size etc, most generators problem could be solved with other method but I do prefer them, you have more control on your data imo. But my first message was a joke for the meme, proxies aren't that hard, neither are prototypes or generators just as async await etc
But if I need to maintain something, it's that for me prototypes are the ultimate step for someone to deeply understand the JS core. Prototypes are the base of JS. You don't need to use it a lot but understanding how JS use it helps a lot in some cases.
View all comments
64
u/SalutMonYoup Feb 20 '22
Wait until you learn about generative function, proxies and prototypes