Skip to content

Latest commit

 

History

History

11_Train-Generator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Train Stops

What You'll Do

Create a generator function called getStop which yields different stops on the train line from Poughkeepsie to Grand Central Station.

The stops are as follows:

  • Poughkeepsie
  • Newburgh
  • Peekskill
  • Yonkers
  • Bronx
  • Grand Central

You will have a button with an id of next-stop that, when clicked, will console log the next stop or if the end of the line has been reached will console log "We made it!"

Requirements

  • Use a generator function

Output

  • Poughkeepsie
  • Newburgh
  • Peekskill
  • Yonkers
  • Bronx
  • Grand Central
  • We made it!