Advertisement
nikolayneykov

Untitled

Mar 23rd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(text1, text2) {
  2.     let newtext = text1
  3.     text1 = text1.toLowerCase()
  4.     text2 = text2.toLowerCase().split(' ');
  5.     if (text2.includes(text1)) {
  6.         console.log(newtext);
  7.     } else {
  8.         console.log(`${newtext} not found!`);
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement