S15 - ES6 - Modern JavaScript (A must in 2019)/ES6 - New Data Structures and Iteration/2. Iterators - next - generators - Your final code/code.js
//generator functions: factory of iterators
generator functions: factory of iterators
generator functions : factory of iterators
function* genIterator(){
    console.log('running');
    yield 1; 
    console.log('running');
    yield 2;
}
function * genIterator ( ) { console . log ( 'running' ) ; yield 1 ; console . log ( 'running' ) ; yield 2 ; }
generator functions: factory of iterators
generator functions : factory of iterators
//pause generator