Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(string){
- string = string.split(' ')
- function onlyLettersAndNumbers(str) {
- return Boolean(str.match(/#[A-Za-z]/));
- }
- for (const word of string){
- if (onlyLettersAndNumbers(word)){
- console.log(word.slice(1, word.length))
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement