I am writing my own library and i have a text file which i need to load into a variable. I know i can do this using Jquery but i would really like to know how this is done using java script native. I couldn't find any good resources for this so here i am :/
Soooo how do i replace this code with javascript?
$('#result').load('txt.txt', function() {
alert('Load was performed.');
});
I actually need the text to be in a variable and not an element.