How do you read a local text file, and make each line a item of a list in javascript? [closed]2019 Community Moderator ElectionHow to list the properties of a JavaScript object?How do you get a timestamp in JavaScript?How can you encode a string to Base64 in JavaScript?How do you access the matched groups in a JavaScript regular expression?How to insert an item into an array at a specific index (JavaScript)?How do you check if a variable is an array in JavaScript?How do I include a JavaScript file in another JavaScript file?How do I make the first letter of a string uppercase in JavaScript?How to merge two arrays in JavaScript and de-duplicate itemsHow to remove the first Item from a list?

Deleting missing values from a dataset

Sword in the Stone story where the sword was held in place by electromagnets

Time travel short story where dinosaur doesn't taste like chicken

Running a subshell from the middle of the current command

Time dilation for a moving electronic clock

Decoding assembly instructions in a Game Boy disassembler

Counter-example to the existence of left Bousfield localization of combinatorial model category

Best approach to update all entries in a list that is paginated?

Replacing Windows 7 security updates with anti-virus?

Coworker uses her breast-pump everywhere in the office

Is it ok to include an epilogue dedicated to colleagues who passed away in the end of the manuscript?

Potentiometer like component

Does splitting a potentially monolithic application into several smaller ones help prevent bugs?

Plywood subfloor won't screw down in a trailer home

Is going from continuous data to categorical always wrong?

Need some help with my first LaTeX drawing…

Who is our nearest neighbor

If Invisibility ends because the original caster casts a non-concentration spell, does Invisibility also end on other targets of the original casting?

What is the difference between "shut" and "close"?

What has been your most complicated TikZ drawing?

Confusion with the nameplate of an induction motor

Single word request: Harming the benefactor

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?

How to make readers know that my work has used a hidden constraint?



How do you read a local text file, and make each line a item of a list in javascript? [closed]



2019 Community Moderator ElectionHow to list the properties of a JavaScript object?How do you get a timestamp in JavaScript?How can you encode a string to Base64 in JavaScript?How do you access the matched groups in a JavaScript regular expression?How to insert an item into an array at a specific index (JavaScript)?How do you check if a variable is an array in JavaScript?How do I include a JavaScript file in another JavaScript file?How do I make the first letter of a string uppercase in JavaScript?How to merge two arrays in JavaScript and de-duplicate itemsHow to remove the first Item from a list?










0















I am making a language learning html app, and I want to read a local text file called words.txt ,and turn each sentence into a item of a list. I know how to do this with python, but not with javascript. I was wondering If I can get some help with this.The user will not upload the file, and the file will just be in the apps directory.This will be Local on the computer.I would know when the sentence ends with a space.It will also run on the chrome browser. Basically I want this but in javascript :



text_file = open("filename.dat", "r")


lines = text_file.read().split(',')










share|improve this question















closed as too broad by Pointy, esqew, Heretic Monkey, tevemadar, Cody Gray Mar 6 at 18:01


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • How would you know where a "sentence" ends?

    – gilamran
    Mar 6 at 17:54











  • I would know where the sentence ends with a space at the end of the word.

    – Mark Ratcliffe
    Mar 6 at 17:56











  • You've add more context, but still not enough. You didn't answer @FelixKling's question of whether it runs in a browser or not. The answer is very important, because browsers do not have access to the local file system.

    – Heretic Monkey
    Mar 6 at 17:56











  • You could show some Python code then, and ask about the parts you find problematic to convert into JavaScript

    – tevemadar
    Mar 6 at 17:59











  • I fixed it. I added what Was I wanted in javascript.

    – Mark Ratcliffe
    Mar 6 at 18:07















0















I am making a language learning html app, and I want to read a local text file called words.txt ,and turn each sentence into a item of a list. I know how to do this with python, but not with javascript. I was wondering If I can get some help with this.The user will not upload the file, and the file will just be in the apps directory.This will be Local on the computer.I would know when the sentence ends with a space.It will also run on the chrome browser. Basically I want this but in javascript :



text_file = open("filename.dat", "r")


lines = text_file.read().split(',')










share|improve this question















closed as too broad by Pointy, esqew, Heretic Monkey, tevemadar, Cody Gray Mar 6 at 18:01


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • How would you know where a "sentence" ends?

    – gilamran
    Mar 6 at 17:54











  • I would know where the sentence ends with a space at the end of the word.

    – Mark Ratcliffe
    Mar 6 at 17:56











  • You've add more context, but still not enough. You didn't answer @FelixKling's question of whether it runs in a browser or not. The answer is very important, because browsers do not have access to the local file system.

    – Heretic Monkey
    Mar 6 at 17:56











  • You could show some Python code then, and ask about the parts you find problematic to convert into JavaScript

    – tevemadar
    Mar 6 at 17:59











  • I fixed it. I added what Was I wanted in javascript.

    – Mark Ratcliffe
    Mar 6 at 18:07













0












0








0


1






I am making a language learning html app, and I want to read a local text file called words.txt ,and turn each sentence into a item of a list. I know how to do this with python, but not with javascript. I was wondering If I can get some help with this.The user will not upload the file, and the file will just be in the apps directory.This will be Local on the computer.I would know when the sentence ends with a space.It will also run on the chrome browser. Basically I want this but in javascript :



text_file = open("filename.dat", "r")


lines = text_file.read().split(',')










share|improve this question
















I am making a language learning html app, and I want to read a local text file called words.txt ,and turn each sentence into a item of a list. I know how to do this with python, but not with javascript. I was wondering If I can get some help with this.The user will not upload the file, and the file will just be in the apps directory.This will be Local on the computer.I would know when the sentence ends with a space.It will also run on the chrome browser. Basically I want this but in javascript :



text_file = open("filename.dat", "r")


lines = text_file.read().split(',')







javascript arrays






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 6 at 18:01







Mark Ratcliffe

















asked Mar 6 at 17:46









Mark RatcliffeMark Ratcliffe

62




62




closed as too broad by Pointy, esqew, Heretic Monkey, tevemadar, Cody Gray Mar 6 at 18:01


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as too broad by Pointy, esqew, Heretic Monkey, tevemadar, Cody Gray Mar 6 at 18:01


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • How would you know where a "sentence" ends?

    – gilamran
    Mar 6 at 17:54











  • I would know where the sentence ends with a space at the end of the word.

    – Mark Ratcliffe
    Mar 6 at 17:56











  • You've add more context, but still not enough. You didn't answer @FelixKling's question of whether it runs in a browser or not. The answer is very important, because browsers do not have access to the local file system.

    – Heretic Monkey
    Mar 6 at 17:56











  • You could show some Python code then, and ask about the parts you find problematic to convert into JavaScript

    – tevemadar
    Mar 6 at 17:59











  • I fixed it. I added what Was I wanted in javascript.

    – Mark Ratcliffe
    Mar 6 at 18:07

















  • How would you know where a "sentence" ends?

    – gilamran
    Mar 6 at 17:54











  • I would know where the sentence ends with a space at the end of the word.

    – Mark Ratcliffe
    Mar 6 at 17:56











  • You've add more context, but still not enough. You didn't answer @FelixKling's question of whether it runs in a browser or not. The answer is very important, because browsers do not have access to the local file system.

    – Heretic Monkey
    Mar 6 at 17:56











  • You could show some Python code then, and ask about the parts you find problematic to convert into JavaScript

    – tevemadar
    Mar 6 at 17:59











  • I fixed it. I added what Was I wanted in javascript.

    – Mark Ratcliffe
    Mar 6 at 18:07
















How would you know where a "sentence" ends?

– gilamran
Mar 6 at 17:54





How would you know where a "sentence" ends?

– gilamran
Mar 6 at 17:54













I would know where the sentence ends with a space at the end of the word.

– Mark Ratcliffe
Mar 6 at 17:56





I would know where the sentence ends with a space at the end of the word.

– Mark Ratcliffe
Mar 6 at 17:56













You've add more context, but still not enough. You didn't answer @FelixKling's question of whether it runs in a browser or not. The answer is very important, because browsers do not have access to the local file system.

– Heretic Monkey
Mar 6 at 17:56





You've add more context, but still not enough. You didn't answer @FelixKling's question of whether it runs in a browser or not. The answer is very important, because browsers do not have access to the local file system.

– Heretic Monkey
Mar 6 at 17:56













You could show some Python code then, and ask about the parts you find problematic to convert into JavaScript

– tevemadar
Mar 6 at 17:59





You could show some Python code then, and ask about the parts you find problematic to convert into JavaScript

– tevemadar
Mar 6 at 17:59













I fixed it. I added what Was I wanted in javascript.

– Mark Ratcliffe
Mar 6 at 18:07





I fixed it. I added what Was I wanted in javascript.

– Mark Ratcliffe
Mar 6 at 18:07












0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved