Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(text, word) {
- const result = text.split(' ').filter((w) => w === word);
- console.log(result.length);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement