i found this code that can read text files from online
fetch("link.txt")
.then(r => r.text())
.then(t => console.log(t));
but how do i make it return the text files instead of writing it to the console. I'm not so good at using the fetch function and i've tried everything i could think of but it just won't work