I would like to know, how can I write to file a data from JavaScript. I have a HTML with two buttons and in JavaScript I count the time between clicking of them. And I need variable "difference" write and save to a file to PC. I have not got server. How could I do that? Thanks
JavaScript
function startButton() {
startTime = Date.now(); }
function stopButton() {
if (startTime) {
var endTime = Date.now();
difference = endTime - startTime;
alert('Reaction time: ' + difference + ' ms');
startTime = null;
} else
alert('Click the Start button first'); }