Advertisement
bebo231312312321

Untitled

Mar 12th, 2023
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. function wordFinder(word, text){
  2. let words = word.toLowerCase()
  3. let texts = text.toLowerCase().split(" ")
  4.  
  5. if(texts.includes(words)){
  6. console.log(word)
  7. }else{
  8. console.log(`${word} not found!`)
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement