Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jonathans199/5229cf90ecbd4e0f1588341e0e79c889 to your computer and use it in GitHub Desktop.
Save jonathans199/5229cf90ecbd4e0f1588341e0e79c889 to your computer and use it in GitHub Desktop.
Day 5 of import export
we learned
// name this function get coffess and export it
exports.getCoffeesTitles = function () {
// filter all coffees which is an array of objects
const coffeeTitles = allCoffees.filter(function(item){
// return each coffee with its title
return item.title
})
// showing new array with just titles
console.log('here is my new array with just titles', coffeeTitles)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment