get the current directory name in javascript

Solutions on MaxInterview for get the current directory name in javascript by the best coders in the world

showing results for - "get the current directory name in javascript"
Kim
07 Feb 2020
1var location = window.location.pathname;
2var directoryPath = location.substring(0, location.lastIndexOf("/")+1);
3
similar questions