diff --git a/01_Day_JavaScript_Refresher/exercise_02/countries.js b/01_Day_JavaScript_Refresher/exercise_02/countries.js index b348509..dc7b8ad 100644 --- a/01_Day_JavaScript_Refresher/exercise_02/countries.js +++ b/01_Day_JavaScript_Refresher/exercise_02/countries.js @@ -1,5 +1,4 @@ - -export function country() +function country() { const countries = [ 'Albania', diff --git a/01_Day_JavaScript_Refresher/exercise_02/main.js b/01_Day_JavaScript_Refresher/exercise_02/main.js index a47720e..c4051d7 100644 --- a/01_Day_JavaScript_Refresher/exercise_02/main.js +++ b/01_Day_JavaScript_Refresher/exercise_02/main.js @@ -1,4 +1,37 @@ -import { web_tech } from "./webtechs" + +function web_tech() +{ + const webTechs = [ + 'HTML', + 'CSS', + 'JavaScript', + 'React', + 'Redux', + 'Node', + 'MongoDB', + ] + return webTechs +} + + +function country() +{ + const countries = [ + 'Albania', + 'Bolivia', + 'Canada', + 'Denmark', + 'Ethiopia', + 'Finland', + 'Germany', + 'Hungary', + 'Ireland', + 'Japan', + 'Kenya', +] + return countries +} + let text = 'I love teaching and empowering people. I teach HTML, CSS, JS, React, Python.' let new_array = [] @@ -34,10 +67,11 @@ console.log(shopping_cart) //3 console.log("untested") let found = false -for(let i in countries) +let c = country() +for(let i in c) { - if(countries[i] == "Ethiopia") + if (c[i] == "Ethiopia") { console.log("ETHIOPIA") found = true @@ -45,6 +79,26 @@ for(let i in countries) } if(found == false) { - countries.push("Ethiopia") + c.push("Ethiopia") } -console.log(countries) //4 +console.log(c) //4 +found = false +t = web_tech() +for(let i in t) +{ + if(t[i] == "Sass") + { + found = true + console.log("Sass is a cSS preprocess") + } +} +if(found == false) +{ + t.push("Sass") +} +console.log(t) //5 +let frontEnd = ['HTML', 'CSS', 'JS', 'React', 'Redux'] +let backEnd = ['Node', 'Express', 'MongoDB'] + +let fullstack = frontEnd + backEnd +console.log(fullstack) diff --git a/01_Day_JavaScript_Refresher/exercise_02/webtechs.js b/01_Day_JavaScript_Refresher/exercise_02/webtechs.js index b1673f3..27ba094 100644 --- a/01_Day_JavaScript_Refresher/exercise_02/webtechs.js +++ b/01_Day_JavaScript_Refresher/exercise_02/webtechs.js @@ -1,4 +1,4 @@ -export function web_tech() +function web_tech() { const webTechs = [ 'HTML',