Answers for "how to get the current path javascript"

8

javascript get url path

window.location.pathname
Posted by: Guest on June-06-2020
0

get current path nodejs

console.log("Current directory:", __dirname);
//OR
console.log("Current directory:", process.cwd());
//OR
const path = require("path");

const directoryName = path.basename(__dirname);
console.log(directoryName);
Posted by: Guest on March-24-2022

Code answers related to "how to get the current path javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language