ES6 Generators
Sanket Meghani

Hard to see much use in the simple case above, but looping over a json object or array has huge possibilities. Mainly from storing state and totals internal to the generator rather than in the global or block context.

Like what you read? Give Rick Marshall a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.