Like the title is saying, I'm trying to download a text file in javascript. Best way would be a .docx file but .txt is ok. I saw the blob framework and tried it but doesn't work.. Looks like it can't save my file.
My code to save my text file:
function totxt(){
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
saveAs(blob, "helloworld.txt");
}