get filename without extension javascriptt code example
Example 1: how to get the extension from filename using javascript
var ext = fileName.substr(fileName.lastIndexOf('.') + 1);
Example 2: node js get file name without extension
filename.split('.').slice(0, -1).join('.')