Modern JavaScript Web Development Cookbook
上QQ阅读APP看书,第一时间看更新

Documenting your code with JSDoc

A good rule for maintainability is that code should be documented. JSDoc (or JSDoc3; the name reflects the current version, 3.6.0) is an API documentation generator, which can produce an HTML website with full documentation for your code. You only have to add comments (in a specific format) to your source code, and JSDoc will scan the code to pick them up and generate the documentation. Let's first see how those comments should be written, and then turn to a tool to make the work easier with VSC. 

The official web page for JSDoc is at http://usejsdoc.org/, and the source code can be found at  https://github.com/jsdoc3/jsdoc