Compare a Generator to Using Array Map and Filter

John Lindquist
InstructorJohn Lindquist

Share this video with your friends

Send Tweet

Generators offer flexible alternatives to working with arrays and how you want to iterate through the data. While most scenarios are covered by the methods included on Arrays such as "map" and "filter", generators are great for covering complex scenarios when writing all your logic in map and filter functions might become difficult.