NPN328
NPN328

Reputation: 1942

Is there a convention on how to document a JavaScript file with comments? Like function signatures, examples, etc

Java has Javadoc, Python has docstring. Is there something similar in JavaScript?

Upvotes: 62

Views: 31780

Answers (1)

Tibos
Tibos

Reputation: 27823

The most commonly used is JsDoc (https://jsdoc.app/).

This is also a tool that generates documentation from your sources, commented with JsDoc style: https://github.com/jsdoc3/jsdoc

Upvotes: 54

Related Questions