W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
37 questions for “Iterators & Generators”
Found in 1 field. Select a question to see its full answer.
Matching topics
JavaScript
Iterators
&
Generators
10
Python
Iterators
& the Iterator Protocol
9
PHP
Generators
&
Iterators
7
JavaScript
Async
Iterators
& Streams
2
Python
Comprehensions &
Generators
2
Python
Async
Generators
& Async Context Managers
1
Information Technology
37 questions in 4 technologies
#
Question
Technology
Topic
Level
1
How were
generators
historically used to write asynchronous code before async/await existed?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Advanced
2
Can you use a for...of loop directly on a generator's return value?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Beginner
3
How do you implement an infinite sequence using a generator, and why is this safe?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Intermediate
4
What makes an object 'iterable' in JavaScript?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Beginner
5
How do you write a basic generator function?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Beginner
6
How does yield pause and resume execution, and what does it return to the caller?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Intermediate
7
How do you delegate from one generator to another using yield*?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Intermediate
8
How do you use generator.throw() and generator.return() to control a running generator externally?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Advanced
9
How would you implement a custom Symbol.iterator for a tree data structure to enable depth-first traversal with for...of?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Advanced
10
What's the performance and memory advantage of a generator-based lazy pipeline over building intermediate arrays with map/filter?
JavaScript › Iterators & Generators
JavaScript
Iterators
&
Generators
Advanced
Show all 37 questions in Information Technology