Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created November 17, 2020 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/956579de667a781bc6bc21d0a6557aeb to your computer and use it in GitHub Desktop.
Save codecademydev/956579de667a781bc6bc21d0a6557aeb to your computer and use it in GitHub Desktop.
Codecademy export
const veggies = ['broccoli', 'spinach', 'cauliflower', 'broccoflower'];
const politelyDecline = (veg) => {
console.log('No ' + veg + ' please. I will have pizza with extra cheese.');
}
// Write your code here:
const declineEverything = (arr) => {
veggies.forEach(veggie) => politelyDecline(veggie);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment