Generator

A generator is a special type of function in JavaScript that can be paused and resumed multiple times.