I have a text file which contains a list of words. I would like to open it, read it line by line and save its content as a string list, so that each word becomes an elemetn of thes string list. The I need to shuffle it to randomise the order. Could someone please explain me how to do this with JavaScript? I am very lost and would be very grateful for any help.
Asked
Active
Viewed 50 times
-1
-
1Does this answer your question? [Using Node.JS, how do I read a JSON file into (server) memory?](https://stackoverflow.com/questions/10011011/using-node-js-how-do-i-read-a-json-file-into-server-memory) – machineghost May 16 '21 at 16:23
-
1What kind of environment are we talking about? A webbrowser? A server (like NodeJS)? And where is this file stored? – Ivar May 16 '21 at 16:23
1 Answers
0
Here's the code to read data from textarea and then shuffle it https://github.com/reboot13-git/shuffle/blob/main/app.js

Krutik Raut
- 139
- 7