How to Get the File Extension from a Filename String
You can combine lastIndexOf() and slice() to get the file extension.
You can combine lastIndexOf() and slice() to get the file extension.
How to create a title capitalization function in JavaScript.
Learn how to merge multiple strings into one in various formats, including a comma-separated list.