extension of file check in js code example Example: how to check the extension of a file in javascript return filename.split('.').pop();