Robin Generator Code

This is my code for the Robin generator. May or may not be way more complicated than it needs to be, I'm very new to JS, but it runs and thats enough in my books.