Hello I want to switch the ranking and cereal of my array around using the .map, however I am getting an undefined to the console.log. Based on the awesome feedback I was able to get everything working, however I am still a bit confused about something. For I am not sure how to match the cereal up with the ranking in reverse order? I am totally stumped.
var breakFastFood =[
{
cereal: "Captain Crunch",
scale: "Yuck!"
},
{
cereal: "Grape Nuts",
scale: "Yum!"
},
{
cereal: "Fruity Pebbles",
scale: "Yuck!"
},
{
cereal: "Oatmeal",
scale: "Yum!"
}
];
var cereals = breakFastFood.map(function(bFood){
return breakFastFood.cereal
});
var rank = breakFastFood.map(function(standing){
return breakFastFood.scale
});
rank.forEach(function(rating){console.log(rating)});
cereals.forEach(function(food){console.log(food)});