diff --git a/Test/1/array-exersise-2.js b/Test/1/array-exersise-2.js new file mode 100644 index 0000000..9c44dae --- /dev/null +++ b/Test/1/array-exersise-2.js @@ -0,0 +1,31 @@ +// Exercise: Level 2 +// Create a separate countries.js file and store the countries array into this file, create a separate file web_techs.js and store the webTechs array into this file. Access both file in main.js file + +// First remove all the punctuations and change the string to array and count the number of words in the array + +let text = + 'I love teaching and empowering people. I teach HTML, CSS, JS, React, Python.' +console.log(words) +console.log(words.length) +["I", "love", "teaching", "and", "empowering", "people", "I", "teach", "HTML", "CSS", "JS", "React", "Python"] + +13 +// In the following shopping cart add, remove, edit items + +const shoppingCart = ['Milk', 'Coffee', 'Tea', 'Honey'] + // add 'Meat' in the beginning of your shopping cart if it has not been already added + // add Sugar at the end of you shopping cart if it has not been already added + // remove 'Honey' if you are allergic to honey + // modify Tea to 'Green Tea' + +// In countries array check if 'Ethiopia' exists in the array if it exists print 'ETHIOPIA'. If it does not exist add to the countries list. + +// In the webTechs array check if Sass exists in the array and if it exists print 'Sass is a CSS preprocess'. If it does not exist add Sass to the array and print the array. + +// Concatenate the following two variables and store it in a fullStack variable. + +const frontEnd = ['HTML', 'CSS', 'JS', 'React', 'Redux'] +const backEnd = ['Node', 'Express', 'MongoDB'] + +console.log(fullStack) +["HTML", "CSS", "JS", "React", "Redux", "Node", "Express", "MongoDB"] \ No newline at end of file