Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function stringSubstring(word, text) {
- let words = text.split(' ');
- for (let el of words) {
- if (el.toLowerCase() === word.toLowerCase()) {
- console.log(word);
- return;
- }
- }
- console.log(`${word} not found!`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement