Skip to content

Instantly share code, notes, and snippets.

@giancorzo
Created May 22, 2017 20:41
Show Gist options
  • Save giancorzo/71c1467fba2dcc067be90fdb9b69055c to your computer and use it in GitHub Desktop.
Save giancorzo/71c1467fba2dcc067be90fdb9b69055c to your computer and use it in GitHub Desktop.
const stations = [{id: 1, name: "Pardo"}, {id: 2, name: "Benavides"}];
// Map, reduce y Filter son clasicos ejemplos de callback,
// donde se delega la lógica detrás del map a una función externa haciéndo
// reutilizable el código
const stationNames = stations.map((station) => {
return station.name;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment