File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,9 @@ console.log(`The base part of ${filePath} is ${base}`);
1717// Create a variable to store the dir part of the filePath variable
1818// Create a variable to store the ext part of the variable
1919
20-
21- let dirDirectory = filePath . slice ( filePath . indexOf ( "/" ) , filePath . lastIndexOf ( "." ) ) ;
20+ let dirDirectory = filePath . slice ( filePath . indexOf ( "Users" ) , filePath . lastIndexOf ( "/" ) ) ;
2221let extDirectory = filePath . slice ( filePath . lastIndexOf ( "." ) ) ;
23- let baseDirectory = filePath . slice ( filePath . lastIndexOf ( "/" ) ) ;
2422console . log ( `The dir part of the file is ${ dirDirectory } .` ) ;
2523console . log ( `The ext part of the file is ${ extDirectory } .` ) ;
26- console . log ( `The base part of the file is ${ baseDirectory } .` ) ;
24+
2725// https://www.google.com/search?q=slice+mdn
You can’t perform that action at this time.
0 commit comments