JSDoc

Why code documentation?

Forms of code documentation

  • howtos guides for using your code
  • a nice README for the repo
  • code documentation in the source
code

What "data" should be?

code

JSDoc annotations for function parameters

code
code

Real-time hints in Visual Studio Code

code

@author

code

@return (or @returns)

code

Function which returns a number:

code

Some of the more popular annotation tags:

code

Generating the docs

npm init -y

npm i jsdoc --save-dev

node_modules/jsdoc/jsdoc.js app.js

Documentation in HTML

code

Useful Links

JSDoc Documentation

devdocs.io - JSDoc

Thanks for your attention