Advertisement
pacho_the_python

Untitled

Feb 24th, 2023
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. function solve(string){
  2. string = string.split(' ')
  3. function onlyLettersAndNumbers(str) {
  4. return Boolean(str.match(/#[A-Za-z]/));
  5. }
  6. for (const word of string){
  7. if (onlyLettersAndNumbers(word)){
  8. console.log(word.slice(1, word.length))
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement