-
-
Save codecademydev/b8b5d82a420f95dc1c3df69b9c9df81e to your computer and use it in GitHub Desktop.
Codecademy 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
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 = arr1 => { | |
arr1.forEach(politelyDecline); | |
} | |
const acceptEverything = arr2 => { | |
for (let j in arr2) { | |
console.log(`Ok, I guess I will eat some ${arr2[j]}.`) | |
} | |
} | |
politelyDecline(veggies) | |
acceptEverything(veggies) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment