How To Generate Contents For Posts With JavaScript?
Sometimes we write longer articles, posts or documents with titles and subtitles. Having many titles/subtitles it would be nice if we could easily generate a "contents" section at the top of the article.