From 1343701313ed334b375fa134dc1c29689e8d6b94 Mon Sep 17 00:00:00 2001 From: Patrick Njuguna Date: Fri, 10 Jan 2020 07:04:30 +0300 Subject: [PATCH] map example fix I am not sure what the intention was with the countyCode code, but to get the output in the example, it should be written this way --- 09_Day/09_day_higher_order_functions.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/09_Day/09_day_higher_order_functions.md b/09_Day/09_day_higher_order_functions.md index 407579c..9fdafc8 100644 --- a/09_Day/09_day_higher_order_functions.md +++ b/09_Day/09_day_higher_order_functions.md @@ -241,9 +241,7 @@ const countries = [ 'Kenya' ] const countriesToUpperCase = countries.map(function(country){ - let countryCode = country.toUpperCase().slice(0, 3) - let country = country.length - return [] + return country.toUpperCase(); }) console.log(countriesToUpperCase) // ['ALBANIA', 'BOLIVIA', 'CANADA', 'DENMARK', 'ETHIOPIA', 'FINLAND', 'GERMANY', 'HUNGARY', 'IRELAND', 'JAPAN', 'KENYA'] @@ -581,4 +579,4 @@ console.log(users); // sorted ascending 🎉 CONGRATULATIONS ! 🎉 -[<< Day 8](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/08_Day/08_day_objects.md) | [Day 10 >>](#) \ No newline at end of file +[<< Day 8](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/08_Day/08_day_objects.md) | [Day 10 >>](#)