Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this script will help you find out the best 7-letter word
- // http://www.allscrabblewords.com/7-letter-words/
- const words = document.querySelector('ul.list-inline').children;
- const fitWords = [...words]
- .map(li => li.children[0])
- .map(a => a.innerText)
- // (1) blacklist letter you don't want to be in your word into this regex
- // (2) get words with unique letters
- .filter(w => !w.match(/[acqueir]/g) && new Set(w.split('')).size === w.length)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement