From 305c4c7665cc4f37c9dd28384757882ef9fe3848 Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Thu, 3 Aug 2023 20:47:04 +0800 Subject: [PATCH 1/9] fixed for of loop description --- 06_Day_Loops/06_day_loops.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index c093495..406b0a0 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -151,7 +151,7 @@ do { ### for of loop -We use for of loop for arrays. It is very hand way to iterate through an array if we are not interested in the index of each element in the array. +We use for of loop for arrays. It is a very handy way to iterate through an array if we are not interested in the index of each element in the array. ```js for (const element of arr) { From 43d0e738ead3f49190200712b67e88054f5f09be Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Fri, 4 Aug 2023 08:10:38 +0800 Subject: [PATCH 2/9] fixed grammar for level 1 exercises #13 and #14 --- 06_Day_Loops/06_day_loops.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index 406b0a0..30983b9 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -351,8 +351,8 @@ for(let i = 0; i <= 5; i++){ [2550, 2500] ``` -13. Develop a small script which generate array of 5 random numbers -14. Develop a small script which generate array of 5 random numbers and the numbers must be unique +13. Develop a small script which generate an array of 5 random numbers +14. Develop a small script which generate an array of 5 random numbers and the numbers must be unique 15. Develop a small script which generate a six characters random id: ```sh From d6af6a2b0eaec824a4ac6e2ab722c99a6aecc9d4 Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Sun, 6 Aug 2023 11:55:54 +0800 Subject: [PATCH 3/9] fixed instructions for level 2 exercise #8 --- 06_Day_Loops/06_day_loops.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index 30983b9..a6c7e0c 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -420,7 +420,7 @@ for(let i = 0; i <= 5; i++){ ['Finland','Ireland', 'Iceland'] ``` -3. In above countries array, check if there is a country or countries end with a substring 'ia'. If there are countries end with, print it as array. If there is no country containing the word 'ai', print 'These are countries ends without ia'. +3. In above countries array, check if there is a country or countries end with a substring 'ia'. If there are countries end with 'ia', print it as array. If there is no country containing the word 'ia', print 'These are countries ends without ia'. ```sh ['Albania', 'Bolivia','Ethiopia'] From 929588f20045968f18a42718590a4493b42572aa Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Wed, 23 Aug 2023 10:07:27 +0800 Subject: [PATCH 4/9] fixed instructions for level 2 execises 2, 3, 4, and 5 --- 06_Day_Loops/06_day_loops.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index a6c7e0c..0a053b9 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -414,13 +414,13 @@ for(let i = 0; i <= 5; i++){ ] ``` -2. In above countries array, check if there is a country or countries containing the word 'land'. If there are countries containing 'land', print it as array. If there is no country containing the word 'land', print 'All these countries are without land'. +2. In the countries array above, check if there is a country or countries containing the word 'land'. If there are countries containing 'land', print it as array. If there is no country containing the word 'land', print 'All these countries are without land'. ```sh ['Finland','Ireland', 'Iceland'] ``` -3. In above countries array, check if there is a country or countries end with a substring 'ia'. If there are countries end with 'ia', print it as array. If there is no country containing the word 'ia', print 'These are countries ends without ia'. +3. In the countries array above, check if there is a country or countries end with a substring 'ia'. If there are countries end with 'ia', print it as array. If there is no country containing the word 'ia', print 'These are countries ends without ia'. ```sh ['Albania', 'Bolivia','Ethiopia'] From 48645d05d56f20363fe3e25437bd50f37a6563b9 Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Wed, 23 Aug 2023 10:08:26 +0800 Subject: [PATCH 5/9] fixed instructions for level 2 execises 2, 3, 4, and 5 (forgot to save) --- 06_Day_Loops/06_day_loops.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index 0a053b9..72f7557 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -426,13 +426,13 @@ for(let i = 0; i <= 5; i++){ ['Albania', 'Bolivia','Ethiopia'] ``` -4. Using the above countries array, find the country containing the biggest number of characters. +4. Using the countries array above, find the country containing the biggest number of characters. ```sh Ethiopia ``` -5. Using the above countries array, find the country containing only 5 characters. +5. Using the countries array above, find the country containing only 5 characters. ```sh ['Japan', 'Kenya'] From a90afce893a3ef4269d17f5acbfddcbcdad6776b Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Wed, 23 Aug 2023 11:37:24 +0800 Subject: [PATCH 6/9] fixed instruction level 2 exercise #8 --- 06_Day_Loops/06_day_loops.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index 72f7557..7a017ea 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -420,7 +420,7 @@ for(let i = 0; i <= 5; i++){ ['Finland','Ireland', 'Iceland'] ``` -3. In the countries array above, check if there is a country or countries end with a substring 'ia'. If there are countries end with 'ia', print it as array. If there is no country containing the word 'ia', print 'These are countries ends without ia'. +3. In the countries array above, check if there is a country or countries that ends with a substring 'ia'. If there are countries that ends with 'ia', print it as an array. If there is no country containing the word 'ia', print 'These are countries that ends without ia'. ```sh ['Albania', 'Bolivia','Ethiopia'] From 680d3ee8684c8145d1d9df734d1f6cd818333feb Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Thu, 24 Aug 2023 13:38:40 +0800 Subject: [PATCH 7/9] fixed instructions for exercise level 2 #10 --- 06_Day_Loops/06_day_loops.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index 7a017ea..7d37009 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -432,7 +432,7 @@ for(let i = 0; i <= 5; i++){ Ethiopia ``` -5. Using the countries array above, find the country containing only 5 characters. +5. Using the countries array above, find the country or countries containing only 5 characters. ```sh ['Japan', 'Kenya'] From 2e51344ea3d36d103dd02d88629b15cc28e3eb35 Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Thu, 24 Aug 2023 23:28:05 +0800 Subject: [PATCH 8/9] deleted duplicate exercise in level 3 --- 06_Day_Loops/06_day_loops.md | 1 - 1 file changed, 1 deletion(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index 7d37009..deff6ec 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -472,7 +472,6 @@ for(let i = 0; i <= 5; i++){ 1. Copy countries array(Avoid mutation) 1. Arrays are mutable. Create a copy of array which does not modify the original. Sort the copied array and store in a variable sortedCountries 1. Sort the webTechs array and mernStack array -1. Extract all the countries contain the word 'land' from the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and print it as array 1. Find the country containing the hightest number of characters in the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) 1. Extract all the countries contain the word 'land' from the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and print it as array 1. Extract all the countries containing only four characters from the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and print it as array From ee308b0a983cfed3d6f31cae8ce3416a866613ec Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Fri, 25 Aug 2023 15:30:36 +0800 Subject: [PATCH 9/9] fixed instructions for exercise level 3 #8 --- 06_Day_Loops/06_day_loops.md | 367 +++++++++++++++++------------------ 1 file changed, 182 insertions(+), 185 deletions(-) diff --git a/06_Day_Loops/06_day_loops.md b/06_Day_Loops/06_day_loops.md index deff6ec..70a6cac 100644 --- a/06_Day_Loops/06_day_loops.md +++ b/06_Day_Loops/06_day_loops.md @@ -7,10 +7,11 @@ Twitter Follow - Author: - Asabeneh Yetayeh
- January, 2020 -
+Author: +Asabeneh Yetayeh
+ January, 2020 +
+ [<< Day 5](../05_Day_Arrays/05_day_arrays.md) | [Day 7 >>](../07_Day_Functions/07_day_functions.md) @@ -18,17 +19,17 @@ ![Day 5](../images/banners/day_1_6.png) - [📔 Day 6](#-day-6) - - [Loops](#loops) - - [for Loop](#for-loop) - - [while loop](#while-loop) - - [do while loop](#do-while-loop) - - [for of loop](#for-of-loop) - - [break](#break) - - [continue](#continue) - - [💻 Exercises:Day 6](#-exercisesday-6) - - [Exercises: Level 1](#exercises-level-1) - - [Exercises: Level 2](#exercises-level-2) - - [Exercises: Level 3](#exercises-level-3) + - [Loops](#loops) + - [for Loop](#for-loop) + - [while loop](#while-loop) + - [do while loop](#do-while-loop) + - [for of loop](#for-of-loop) + - [break](#break) + - [continue](#continue) + - [💻 Exercises:Day 6](#-exercisesday-6) + - [Exercises: Level 1](#exercises-level-1) + - [Exercises: Level 2](#exercises-level-2) + - [Exercises: Level 3](#exercises-level-3) # 📔 Day 6 @@ -48,24 +49,24 @@ for(initialization, condition, increment/decrement){ ``` ```js -for(let i = 0; i <= 5; i++){ - console.log(i) +for (let i = 0; i <= 5; i++) { + console.log(i); } // 0 1 2 3 4 5 ``` ```js -for(let i = 5; i >= 0; i--){ - console.log(i) +for (let i = 5; i >= 0; i--) { + console.log(i); } // 5 4 3 2 1 0 ``` ```js -for(let i = 0; i <= 5; i++){ - console.log(`${i} * ${i} = ${i * i}`) +for (let i = 0; i <= 5; i++) { + console.log(`${i} * ${i} = ${i * i}`); } ``` @@ -79,10 +80,10 @@ for(let i = 0; i <= 5; i++){ ``` ```js -const countries = ['Finland', 'Sweden', 'Denmark', 'Norway', 'Iceland'] -const newArr = [] -for(let i = 0; i < countries.length; i++){ - newArr.push(countries[i].toUpperCase()) +const countries = ["Finland", "Sweden", "Denmark", "Norway", "Iceland"]; +const newArr = []; +for (let i = 0; i < countries.length; i++) { + newArr.push(countries[i].toUpperCase()); } // ["FINLAND", "SWEDEN", "DENMARK", "NORWAY", "ICELAND"] @@ -91,47 +92,45 @@ for(let i = 0; i < countries.length; i++){ Adding all elements in the array ```js -const numbers = [1, 2, 3, 4, 5] -let sum = 0 -for(let i = 0; i < numbers.length; i++){ - sum = sum + numbers[i] // can be shorten, sum += numbers[i] - +const numbers = [1, 2, 3, 4, 5]; +let sum = 0; +for (let i = 0; i < numbers.length; i++) { + sum = sum + numbers[i]; // can be shorten, sum += numbers[i] } -console.log(sum) // 15 +console.log(sum); // 15 ``` Creating a new array based on the existing array ```js -const numbers = [1, 2, 3, 4, 5] -const newArr = [] -let sum = 0 -for(let i = 0; i < numbers.length; i++){ - newArr.push( numbers[i] ** 2) - +const numbers = [1, 2, 3, 4, 5]; +const newArr = []; +let sum = 0; +for (let i = 0; i < numbers.length; i++) { + newArr.push(numbers[i] ** 2); } -console.log(newArr) // [1, 4, 9, 16, 25] +console.log(newArr); // [1, 4, 9, 16, 25] ``` ```js -const countries = ['Finland', 'Sweden', 'Norway', 'Denmark', 'Iceland'] -const newArr = [] -for(let i = 0; i < countries.length; i++){ - newArr.push(countries[i].toUpperCase()) +const countries = ["Finland", "Sweden", "Norway", "Denmark", "Iceland"]; +const newArr = []; +for (let i = 0; i < countries.length; i++) { + newArr.push(countries[i].toUpperCase()); } -console.log(newArr) // ["FINLAND", "SWEDEN", "NORWAY", "DENMARK", "ICELAND"] +console.log(newArr); // ["FINLAND", "SWEDEN", "NORWAY", "DENMARK", "ICELAND"] ``` ### while loop ```js -let i = 0 +let i = 0; while (i <= 5) { - console.log(i) - i++ + console.log(i); + i++; } // 0 1 2 3 4 5 @@ -140,11 +139,11 @@ while (i <= 5) { ### do while loop ```js -let i = 0 +let i = 0; do { - console.log(i) - i++ -} while (i <= 5) + console.log(i); + i++; +} while (i <= 5); // 0 1 2 3 4 5 ``` @@ -160,60 +159,58 @@ for (const element of arr) { ``` ```js - -const numbers = [1, 2, 3, 4, 5] +const numbers = [1, 2, 3, 4, 5]; for (const num of numbers) { - console.log(num) + console.log(num); } // 1 2 3 4 5 for (const num of numbers) { - console.log(num * num) + console.log(num * num); } // 1 4 9 16 25 // adding all the numbers in the array -let sum = 0 +let sum = 0; for (const num of numbers) { - sum = sum + num - // can be also shorten like this, sum += num + sum = sum + num; + // can be also shorten like this, sum += num // after this we will use the shorter synthax(+=, -=, *=, /= etc) } -console.log(sum) // 15 +console.log(sum); // 15 const webTechs = [ - 'HTML', - 'CSS', - 'JavaScript', - 'React', - 'Redux', - 'Node', - 'MongoDB' -] + "HTML", + "CSS", + "JavaScript", + "React", + "Redux", + "Node", + "MongoDB", +]; for (const tech of webTechs) { - console.log(tech.toUpperCase()) + console.log(tech.toUpperCase()); } // HTML CSS JAVASCRIPT REACT NODE MONGODB for (const tech of webTechs) { - console.log(tech[0]) // get only the first letter of each element, H C J R N M + console.log(tech[0]); // get only the first letter of each element, H C J R N M } - ``` ```js -const countries = ['Finland', 'Sweden', 'Norway', 'Denmark', 'Iceland'] -const newArr = [] -for(const country of countries){ - newArr.push(country.toUpperCase()) +const countries = ["Finland", "Sweden", "Norway", "Denmark", "Iceland"]; +const newArr = []; +for (const country of countries) { + newArr.push(country.toUpperCase()); } -console.log(newArr) // ["FINLAND", "SWEDEN", "NORWAY", "DENMARK", "ICELAND"] +console.log(newArr); // ["FINLAND", "SWEDEN", "NORWAY", "DENMARK", "ICELAND"] ``` ### break @@ -221,11 +218,11 @@ console.log(newArr) // ["FINLAND", "SWEDEN", "NORWAY", "DENMARK", "ICELAND"] Break is used to interrupt a loop. ```js -for(let i = 0; i <= 5; i++){ - if(i == 3){ - break +for (let i = 0; i <= 5; i++) { + if (i == 3) { + break; } - console.log(i) + console.log(i); } // 0 1 2 @@ -235,14 +232,14 @@ The above code stops if 3 found in the iteration process. ### continue -We use the keyword *continue* to skip a certain iterations. +We use the keyword _continue_ to skip a certain iterations. ```js -for(let i = 0; i <= 5; i++){ - if(i == 3){ - continue +for (let i = 0; i <= 5; i++) { + if (i == 3) { + continue; } - console.log(i) + console.log(i); } // 0 1 2 4 5 @@ -254,33 +251,33 @@ for(let i = 0; i <= 5; i++){ ### Exercises: Level 1 - ```js - const countries = [ - 'Albania', - 'Bolivia', - 'Canada', - 'Denmark', - 'Ethiopia', - 'Finland', - 'Germany', - 'Hungary', - 'Ireland', - 'Japan', - 'Kenya' - ] - - const webTechs = [ - 'HTML', - 'CSS', - 'JavaScript', - 'React', - 'Redux', - 'Node', - 'MongoDB' - ] - - const mernStack = ['MongoDB', 'Express', 'React', 'Node'] - ``` +```js +const countries = [ + "Albania", + "Bolivia", + "Canada", + "Denmark", + "Ethiopia", + "Finland", + "Germany", + "Hungary", + "Ireland", + "Japan", + "Kenya", +]; + +const webTechs = [ + "HTML", + "CSS", + "JavaScript", + "React", + "Redux", + "Node", + "MongoDB", +]; + +const mernStack = ["MongoDB", "Express", "React", "Node"]; +``` 1. Iterate 0 to 10 using for loop, do the same using while and do while loop 2. Iterate 10 to 0 using for loop, do the same using while and do while loop @@ -363,109 +360,109 @@ for(let i = 0; i <= 5; i++){ 1. Develop a small script which generate any number of characters random id: - ```sh - fe3jo1gl124g - ``` + ```sh + fe3jo1gl124g + ``` - ```sh - xkqci4utda1lmbelpkm03rba - ``` + ```sh + xkqci4utda1lmbelpkm03rba + ``` 1. Write a script which generates a random hexadecimal number. - ```sh - '#ee33df' - ``` + ```sh + '#ee33df' + ``` 1. Write a script which generates a random rgb color number. - ```sh - rgb(240,180,80) - ``` + ```sh + rgb(240,180,80) + ``` 1. Using the above countries array, create the following new array. - ```sh - ["ALBANIA", "BOLIVIA", "CANADA", "DENMARK", "ETHIOPIA", "FINLAND", "GERMANY", "HUNGARY", "IRELAND", "JAPAN", "KENYA"] - ``` + ```sh + ["ALBANIA", "BOLIVIA", "CANADA", "DENMARK", "ETHIOPIA", "FINLAND", "GERMANY", "HUNGARY", "IRELAND", "JAPAN", "KENYA"] + ``` 1. Using the above countries array, create an array for countries length'. - ```sh - [7, 7, 6, 7, 8, 7, 7, 7, 7, 5, 5] - ``` + ```sh + [7, 7, 6, 7, 8, 7, 7, 7, 7, 5, 5] + ``` 1. Use the countries array to create the following array of arrays: - ```sh - [ - ['Albania', 'ALB', 7], - ['Bolivia', 'BOL', 7], - ['Canada', 'CAN', 6], - ['Denmark', 'DEN', 7], - ['Ethiopia', 'ETH', 8], - ['Finland', 'FIN', 7], - ['Germany', 'GER', 7], - ['Hungary', 'HUN', 7], - ['Ireland', 'IRE', 7], - ['Iceland', 'ICE', 7], - ['Japan', 'JAP', 5], - ['Kenya', 'KEN', 5] - ] - ``` + ```sh + [ + ['Albania', 'ALB', 7], + ['Bolivia', 'BOL', 7], + ['Canada', 'CAN', 6], + ['Denmark', 'DEN', 7], + ['Ethiopia', 'ETH', 8], + ['Finland', 'FIN', 7], + ['Germany', 'GER', 7], + ['Hungary', 'HUN', 7], + ['Ireland', 'IRE', 7], + ['Iceland', 'ICE', 7], + ['Japan', 'JAP', 5], + ['Kenya', 'KEN', 5] + ] + ``` -2. In the countries array above, check if there is a country or countries containing the word 'land'. If there are countries containing 'land', print it as array. If there is no country containing the word 'land', print 'All these countries are without land'. +1. In the countries array above, check if there is a country or countries containing the word 'land'. If there are countries containing 'land', print it as array. If there is no country containing the word 'land', print 'All these countries are without land'. - ```sh - ['Finland','Ireland', 'Iceland'] - ``` + ```sh + ['Finland','Ireland', 'Iceland'] + ``` -3. In the countries array above, check if there is a country or countries that ends with a substring 'ia'. If there are countries that ends with 'ia', print it as an array. If there is no country containing the word 'ia', print 'These are countries that ends without ia'. +1. In the countries array above, check if there is a country or countries that ends with a substring 'ia'. If there are countries that ends with 'ia', print it as an array. If there is no country containing the word 'ia', print 'These are countries that ends without ia'. - ```sh - ['Albania', 'Bolivia','Ethiopia'] - ``` + ```sh + ['Albania', 'Bolivia','Ethiopia'] + ``` -4. Using the countries array above, find the country containing the biggest number of characters. +1. Using the countries array above, find the country containing the biggest number of characters. - ```sh - Ethiopia - ``` + ```sh + Ethiopia + ``` -5. Using the countries array above, find the country or countries containing only 5 characters. +1. Using the countries array above, find the country or countries containing only 5 characters. - ```sh - ['Japan', 'Kenya'] - ``` + ```sh + ['Japan', 'Kenya'] + ``` -6. Find the longest word in the webTechs array -7. Use the webTechs array to create the following array of arrays: +1. Find the longest word in the webTechs array +1. Use the webTechs array to create the following array of arrays: - ```sh - [["HTML", 4], ["CSS", 3],["JavaScript", 10],["React", 5],["Redux", 5],["Node", 4],["MongoDB", 7]] - ``` + ```sh + [["HTML", 4], ["CSS", 3],["JavaScript", 10],["React", 5],["Redux", 5],["Node", 4],["MongoDB", 7]] + ``` -8. An application created using MongoDB, Express, React and Node is called a MERN stack app. Create the acronym MERN by using the array mernStack -9. Iterate through the array, ["HTML", "CSS", "JS", "React", "Redux", "Node", "Express", "MongoDB"] using a for loop or for of loop and print out the items. -10. This is a fruit array , ['banana', 'orange', 'mango', 'lemon'] reverse the order using loop without using a reverse method. -11. Print all the elements of array as shown below. +1. An application created using MongoDB, Express, React and Node is called a MERN stack app. Create the acronym MERN by using the array mernStack +1. Iterate through the array, ["HTML", "CSS", "JS", "React", "Redux", "Node", "Express", "MongoDB"] using a for loop or for of loop and print out the items. +1. This is a fruit array , ['banana', 'orange', 'mango', 'lemon'] reverse the order using loop without using a reverse method. +1. Print all the elements of array as shown below. - ```js - const fullStack = [ - ['HTML', 'CSS', 'JS', 'React'], - ['Node', 'Express', 'MongoDB'] - ] - ```` + ```js + const fullStack = [ + ["HTML", "CSS", "JS", "React"], + ["Node", "Express", "MongoDB"], + ]; + ``` - ```sh - HTML - CSS - JS - REACT - NODE - EXPRESS - MONGODB - ``` + ```sh + HTML + CSS + JS + REACT + NODE + EXPRESS + MONGODB + ``` ### Exercises: Level 3 @@ -476,7 +473,7 @@ for(let i = 0; i <= 5; i++){ 1. Extract all the countries contain the word 'land' from the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and print it as array 1. Extract all the countries containing only four characters from the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and print it as array 1. Extract all the countries containing two or more words from the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and print it as array -1. Reverse the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and capitalize each country and stored it as an array +1. Reverse the [countries array](https://github.com/Asabeneh/30DaysOfJavaScript/tree/master/data/countries.js) and capitalize each country then store it as an array 🎉 CONGRATULATIONS ! 🎉