Advertisement
Guest User

Untitled

a guest
Mar 13th, 2022
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. function hardWords(array){
  2.  
  3. let words = array[1];
  4. let text = array[0];
  5.  
  6. for(let word of words){
  7. text = text.replace("_".repeat(word.length), word)
  8. }
  9. console.log(text);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement