Created
April 9, 2021 15:49
-
-
Save jonathans199/5229cf90ecbd4e0f1588341e0e79c889 to your computer and use it in GitHub Desktop.
Day 5 of import export
This file contains 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
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