📜  javascript 程序名称 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:10.788000             🧑  作者: Mango

代码示例1
var path = require('path');
var programName = path.basename(process.argv[1]);
console.log("Program name = " + programName);

// also
console.log("Program name = " + process.argv[1]);