how create array with names of files in folder nodejs
- Use the fs module to access the file system in Node.js.
- Use the readdirSync method to read the contents of a directory synchronously.
- Pass the directory path as a parameter to readdirSync to retrieve an array of file names in the specified directory.