I don't want to print it on console.
I want to Actually Write data to
Uncaught TypeError: Illegal constructor
SecurityError: The operation is insecure.
var f = "sometextfile.txt";
writeTextFile(f, "Cheese monkey")
function writeTextFile(afilename, output)
var txtFile =new File(afilename);
Some suggestions for this -