N
N
narem2019-08-04 18:56:53
JavaScript
narem, 2019-08-04 18:56:53

How to display the filename using console.log?

MlnKLycG4HI.jpg
console.log(__dirname);
Am I writing something wrong in the file itself? why doesn't it show up?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-08-04
@narem

console.log(__dirname);

Since when is "dir" translated as "file"?
console.log(require('path').basename(__filename));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question