reset password
Author Message
Miro138
Posts: 22
Posted 10:57 Sep 16, 2016 |

Are we allowed to use a for loop to iterate through the array of people inside the higher functions for the age check or are we restricted to using the reduce function for this?

chriscarlson91
Posts: 3
Posted 11:00 Sep 16, 2016 |

I heard him say somthing about not using loops , I used a "forEach" for both function. 

BrianK
Posts: 25
Posted 11:10 Sep 16, 2016 |

You shouldn't need to, array.map is a higher order function that automatically iterates through each of the elements in the array, all you need to do is write the function to pass into .map to apply the new property.

msargent
Posts: 519
Posted 12:38 Sep 16, 2016 |

Don't use loops when you can use a higher order function: that's the whole point of the exercise.