Javascript Quiz: How well do you know Yield in JS

Опубликовано: 31 Октябрь 2024
на канале: Programming Geek
11
2

Are you ready for another code challenge? Join me in this video as you test your coding knowledge with the simple quiz questions.

Don't forget to make your guess in the comments below.

-------------------------------------------------------------------------------------------

🔔Like and subscribe for more videos. 🔔
------------------------------------------------------------------------------------------

Answer: OPTION A:1 and then 2

Explanation:
The generator function yields values one at a time. Each call to generator.next() returns the next value, so it outputs 1 and then 2.