generatorSequence.js

//get generator instance variable let generatorSequenceResult = generatorSequence(); console.log('done value for the first time', generatorSequenceResult.next()) console.log('done value for the second time', generatorSequenceResult.next()) console.log('done value for the third time', generatorSequenceResult.next()) //Running this code will print the following: done value for the first time { value: 'first', done: false } done value for the second time { value: 'second', done: false } done value for the third time { value: 'third', done: false }
Code for Understanding done Property

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.