Skip to content

Latest commit

 

History

History

basics-generators-number-1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Basics - Generators #1

Generators are very useful things in programming, in this series we will learn how to use generators and see how we can apply generators to common programming challenges.

Task

You must complete the generator function that must increment a counter by 1 each time also if the argument is supplied (will always be a number) you must then change the counter to that number.

Important

The counter must start at 1 when the generator is initialized

More Info: Iterators and Generators (JavaScript), Generators Overview (PHP)