Search code examples
javascriptimporttext-files

Is there a way to import all English words from a file?


I want to make a Hangman Game in JavaScript which I need every single every English word, I saw a guy onGitHub That uploaded a .txt file which has got every single English word in a order from top to down, and I wanted to import it (Staright From My Server Or PC) And then put it in a if that checks the entered word is similar with the word in the text file, As Polymars did he made a wordle game in twitter which read that file, I saw so many people saying that it may not load it because of being a such a heavy file. And I really don't know that if it is possible. Please help!


Solution

  • I think is easier if you use a npm module for that, there are several for that purpose: