Difficulty: 6/10generators, control flow, iteratorsyield* delegates iteration to another iterable or generator, yielding each value from that iterable, whereas yield yields a single value.yield* exampleCopyScenario Questions0-2 years experience1Imagine you're writing a helper function to flatten a nested list of user IDs. If you write 'yield [1, 2, 3]', the caller gets the whole array at once. How would you change this so the caller receives each ID one by one without writing a manual loop?2We have a multi-step onboarding wizard. Step 1 has its own generator 'stepOneFlow()', and Step 2 has 'stepTwoFlow()'. How would you write a master 'onboardingFlow()' generator that runs all of Step 1's steps first, and then moves on to Step 2, without manually calling '.next()' on them?Follow-up QuestionsWhat does a yield* expression actually evaluate to when the delegated generator finishes and returns a value?If an error is thrown inside a delegated generator, how does it propagate back up through the yield* delegation chain?What happens if you pass a standard array to yield* instead of another generator function?Suggest Improvement