{"size": 398, "ext": "js", "max_stars_repo_path": "Solutions/JavaScript/Follow that Spy(6 kyu).js", "max_stars_repo_name": "collenirwin/Codewars-Solutions", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Solutions/JavaScript/Follow that Spy(6 kyu).js", "max_issues_repo_name": "collenirwin/Codewars-Solutions", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Solutions/JavaScript/Follow that Spy(6 kyu).js", "max_forks_repo_name": "collenirwin/Codewars-Solutions", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.5333333333, "max_line_length": 75, "alphanum_fraction": 0.5376884422}
// it should return the places from the given routes
function findRoutes(routes) {
  let node = routes
    .filter(x => routes.reduce((t, y) => t + (y[1] === x[0]), 0) === 0)[0];
  const route = new Set(node);
  
  for (let x = 1; x < routes.length; x++) {
    node = routes.filter(x => x[0] === node[1])[0];
    route.add(...node);
  }
  
  route.add(node[1]);
  
  return [...route].join(", ");
}