Web APIs
File.lastModified
Expose the modification time as milliseconds since the Unix epoch. Synthetic File objects can be constructed with an explicit value. Example console output: 1234.
Formal Syntax & Structure
javascript syntaxjavascript
file.lastModifiedReturn Value
number
Modification timestamp in milliseconds.
Working Example
Example Snippetjavascript
const f=new File(["hi"],"note.txt",{lastModified:1234}); console.log(f.lastModified);