From af29ab45c89c0d9569c62b26bf4a619b967b652c Mon Sep 17 00:00:00 2001 From: Jose Linardo Date: Sat, 25 Jun 2022 14:34:24 -0500 Subject: [PATCH] some fix --- .../09_day_starter/scripts/main.js | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/09_Day_Higher_order_functions/09_day_starter/scripts/main.js b/09_Day_Higher_order_functions/09_day_starter/scripts/main.js index ffb2f3b..c217465 100644 --- a/09_Day_Higher_order_functions/09_day_starter/scripts/main.js +++ b/09_Day_Higher_order_functions/09_day_starter/scripts/main.js @@ -196,7 +196,27 @@ function mostUsedInitial(arr) { } console.log(mostUsedInitial(concatenateCountries)); -// Exercises: Level 3 - - - +// Exercises: Level + + + +//2. console.log(mostSpokenLanguages(countries, 10)) +[ + {country: 'English',count:91}, + {country: 'French',count:45}, + {country: 'Arabic',count:25}, + {country: 'Spanish',count:24}, + {country:'Russian',count:9}, + {country:'Portuguese', count:9}, + {country:'Dutch',count:8}, + {country:'German',count:7}, + {country:'Chinese',count:5}, + {country:'Swahili',count:4} + ] + + console.log(mostSpokenLanguages(countries, 3)) + [ + {country: 'English',count: 91}, + {country: 'French',count: 45}, + {country: 'Arabic',count: 25}, + ] \ No newline at end of file