3 ms·
How to Use a Generator Function as a Constructor
- jaceju 10y agoIs there any example for real cases? I don't know the meaning of this workaround.
- gotofritz 10y agoYes, I was going to ask the same. What is the point of this? What problem does it solve?
- geirman 10y agoindeed, why would anyone ever want or need to do this?
- slikts 10y agoJust, why… Pass in a parameter if you need to set the state, no need to mess with the context.