Try to think about solving the problem by evaluating the code yourself.
Here's what this evaluates to in a 'frame by frame' view:
1
var x = new Date(Date.parse(document.lastModified));
document.write(x - document.lastModified);
2
var x = new Date(Date.parse("11/29/2013 14:37:21"));
document.write(x - document.lastModified);
3
var x = new Date(1385753841000);
document.write(x - document.lastModified);
4
var x = "Fri Nov 29 2013 14:37:21 GMT-0500 (EST)";
document.write(x - document.lastModified);
5
document.write("Fri Nov 29 2013 14:37:21 GMT-0500 (EST)" - "11/29/2013 14:37:21");
6
document.write(NaN);
And you get a NaN because string minus string === NaN
.
Frame 3 where you parse the date returns a UNIX Epoch timestamp (number of seconds since 1970 midnight GMT). You can subtract two epochs to get a difference of seconds.