Simplest example of JavaScript generator