Get the file extension from a file name

JavaScript version
const ext = (fileName) => fileName.split('.').pop();
TypeScript version
const ext = (fileName: string): string => fileName.split('.').pop();