- FileReader.readAsArrayBuffer(): Reads the substance of the predefined input document. The outcome trait contains an ArrayBuffer addressing the record’s information.
- FileReader.readAsBinaryString(): Reads the substance of the predetermined information document. The outcome characteristic contains the crude paired information from the document as a string.
- FileReader.readAsDataURL(): Reads the substance of the predefined input document. The outcome trait contains a URL addressing the record’s information.
- FileReader.readAsText(): Reads the substance of the predetermined information document. The outcome quality contains the substance of the document as a text string. This technique can accept encoding form as the second argument(if required). The default encoding is UTF-8.
For this situation we are utilizing FileReader.readAsText() technique to understand nearby .txt document.
<title>Read Text File</title>
This code prints the substance of the info document precisely equivalent to is there in the information record.
Also Read: How to Install Minecraft on Linux?