I really need to learn how to use generators in javascript