how to remove js extation with filename using fs in node code example
Example 1: exclude extension from filename javascript
const file = 'test.jpg';
const filename = file.split('.').slice(0, -1).join('.');
Example 2: node js get file name without extension
filename.split('.').slice(0, -1).join('.')