Also, avoid making duplicate topics. I deleted the second one, even if it gave a crucial information missing here, because it was this topic where you go answers, and I don't delete topics with answers. I deleted the duplicate, though.
Which shouldn't have been in the Programming Questions section, but in the Processing with Other Languages section, because your question is about JavaScript, actually. Hence the peculiar array syntax you use above (I was suspecting something like that...).
JavaScript cannot save data to the user's disk, purely and simply. That would be a security breach to allow a simple script from a random site to write anywhere on the disk of the user (even more to allow to read any file, so loadStrings() won't work either).