Answers for "how to get the name of the file in javascript"

1

get file name nodejs

var path = require('path');
var scriptName = path.basename(__filename);
Posted by: Guest on October-18-2020
0

get current file name javascript

var path = window. location. pathname;
var page = path. split("/"). pop();
console. log( page );
Posted by: Guest on February-01-2022

Code answers related to "how to get the name of the file in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language