When a generator function is called, what is returned?

  • Generator object
  • Array
  • Promise
  • String
When a generator function is called, it returns a Generator object. This object can be used to control the execution of the generator using methods like next(). Options b), c), and d) are incorrect as they do not represent the result of calling a generator function.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *