Generatorobject is returned by a generator function and it conforms to both the iterable protocol and the iterator protocol.
()method returns an object with two properties
value. You can also provide a parameter to the
nextmethod to send a value to the generator.
return()method returns the given value and finishes the generator.
throw()method resumes the execution of a generator by throwing an error into it and returns an object with two properties