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