add new solutions

pull/587/head
hansmbua 3 years ago
parent 8b4f5a7e8c
commit 7443ca6c17

@ -1,7 +1,7 @@
let space = ' ' // an empty space string
let firstName = 'Asabeneh'
let lastName = 'Yetayeh'
let country = 'Finland'
let city = 'Helsinki'
let language = 'JavaScript'
let job = 'teacher'
// 'Love is the best thing in this world. Some found their love and some are still looking for their love.' Count the number of word love in this sentence.
let quote = "Love is the best thing in this world. Some found their love and some are still looking for their love.' Count the number of word love in this sentence.";
let pattern = /love/gi;
let getwords = quote.match(pattern);
const numberOfLove = getwords.length;
console.log(numberOfLove);

Loading…
Cancel
Save