This script will recursively go through the specified directory ("Tutorials" in this case), find all files ending with the specified extension, and generate a table of contents with links to each file along with nested depths for subfolders if any.
While making a repository for my javascript tutorials, I encountered an issue, how do I make a table of contents for a repository which has so many files and subfolders (> 35)... I wanted a code snippet which would ease my work, the below code snippet does exactly that... This will make your life easier!
const fs = require('fs');
const path = require('path');
/**