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

1928 у кіно

Захаров Федір Захарович

Ель Греко