I need to get a txt file's text. I have found that sometimes it works sometimes it doesn't.
var reader = new FileReader();
var fileInput = document.getElementById('fileInput').files[0];
console.log(reader.valueOf());
But when it does work, one of the values in the map is "result" and it has the text of the txt file, so why doesn't it work regularly and how to get the value of "result". Thanks in advance.