- A A function that returns an iterator
- B A function that yields a value
- C A function that does both of the above
- D None of these
- Share this MCQ
Answer:
C
Click me to Read more Question & Answer of
Javascript Functions MCQ
Share this MCQ
A generator function is a function that returns an iterator and can yield a value multiple times.
Generator functions are denoted by the *
symbol and can be paused and resumed at any time.
They are often used to create asynchronous code that is easier to read and maintain.
Share this MCQ