replece() method 100%

pull/420/head
Fitsumhelina 10 months ago
parent d9cc6e0036
commit 350fcf6335

@ -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']

Loading…
Cancel
Save