parent
c8b48c29fc
commit
1805236723
@ -0,0 +1,16 @@
|
||||
const countries = [
|
||||
'Albania',
|
||||
'Bolivia',
|
||||
'Canada',
|
||||
'Denmark',
|
||||
'Ethiopia',
|
||||
'Finland',
|
||||
'Germany',
|
||||
'Hungary',
|
||||
'Ireland',
|
||||
'Japan',
|
||||
'Kenya',
|
||||
]
|
||||
|
||||
export default countries;
|
||||
|
@ -0,0 +1,39 @@
|
||||
import webTechs from "./web_tech.js";
|
||||
import countries from "./countries.js";
|
||||
|
||||
console.log(webTechs);
|
||||
console.log(countries);
|
||||
|
||||
let text =
|
||||
'I love teaching and empowering people. I teach HTML, CSS, JS, React, Python.'
|
||||
|
||||
const words = text.replaceAll(/[.,]/g,'').split(' ');
|
||||
console.log(words,words.length);
|
||||
|
||||
const shoppingCart = ['Milk', 'Coffee', 'Tea', 'Honey'];
|
||||
|
||||
shoppingCart.push('Meat');
|
||||
|
||||
const addItem = (arr,item) => {
|
||||
if( !arr.includes(item) ){ arr.push(item)}else { console.log(item.toUpperCase(),arr) };
|
||||
}
|
||||
|
||||
addItem(shoppingCart,'Sugar')
|
||||
addItem(shoppingCart,'Milk');
|
||||
|
||||
shoppingCart.splice(shoppingCart.indexOf('Honey'),1);
|
||||
shoppingCart[shoppingCart.indexOf('Tea')] = 'Green Tea'
|
||||
|
||||
console.log(shoppingCart)
|
||||
|
||||
addItem(countries,'Ethiopia')
|
||||
|
||||
const frontEnd = ['HTML', 'CSS', 'JS', 'React', 'Redux']
|
||||
const backEnd = ['Node', 'Express', 'MongoDB']
|
||||
|
||||
const fullStack = frontEnd.concat(backEnd)
|
||||
|
||||
console.log(fullStack)
|
||||
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
const webTechs = [
|
||||
'HTML',
|
||||
'CSS',
|
||||
'JavaScript',
|
||||
'React',
|
||||
'Redux',
|
||||
'Node',
|
||||
'MongoDB',
|
||||
]
|
||||
|
||||
export default webTechs;
|
Loading…
Reference in new issue