I am trying to load the text from a local text file into a JavaScript variable. The file will always be the same and no input is taken from the user for this within the HTML. I get the error that parameter 1 is not of type blob for readAsText(). Here is what I have:
function readNumber(){
var fr = new FileReader();
fr.readAsText("C:/Users/home/Documents/Hello_World/src/main/resources/static/numbers.txt");
var number = fr.result;
}