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