nama file tanpa ekstensi javascript

x.replace(/\.[^/.]+$/, "")
Prickly Pelican