How to convert text of a txt file into string in javascript

I want to convert a txt file, which i have uploaded in a form, into string in javascript.

text in my text file is “my name is x”.
Now i want to store the text of the file in javascript as string.
Is there any basic function? looking for a easy solution
**note: do not want to use node.js