Last active
August 6, 2016 06:36
-
-
Save goodbedford/0070be4ba069dc58595e710c64d0bfff to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var foodOrder = ["fries", "shake", "pickles", "polenta", "salad"]; | |
var happyFood = []; | |
//make each food order item print happy | |
// map returns an new array with changed items. | |
happyFood = foodOrder.map(function(item) { | |
return ("Happy-" + item); | |
}); | |
console.log(happyFood) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment