Created
July 25, 2013 15:12
-
-
Save phlco/6080705 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var lStations = [ "8th", "6th", "Union Square", "3rd", "1st" ]; | |
| var nStations = [ "Times Square", "34th", "28th", "23rd", "Union Square", "8th" ]; | |
| var sixStations = [ "Grand Central", "33rd", "28th", "23rd", "Union Square", "Astor Place" ]; | |
| var gStations = [ "Greenpoint", "Nassau", "Metropolitan", "Broadway" ]; | |
| // write a function that accepts a line, and returns a function | |
| // to calculate the distance between two stops on one line | |
| function getDistanceForLine(line){ | |
| // code here? | |
| return function(board, exit) { | |
| // code here! | |
| }; | |
| } | |
| // e.g., | |
| // var getLDistance = getDistanceForLine(lStations); | |
| // getLDistance('8th','6th'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment