GitHub 6521★

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();
Follow me on and to get more useful contents.