|
|
|
@ -3,13 +3,8 @@
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
let text ='I love teaching and empowering people. I teach HTML, CSS, JS, React, Python.'
|
|
|
|
|
const word = text.replace(/[,.]/ ,'')
|
|
|
|
|
// In the following shopping cart add, remove, edit items
|
|
|
|
|
|
|
|
|
|
const shoppingCart = ['Milk', 'Coffee', 'Tea', 'Honey']
|
|
|
|
|