<!--
title: Accurate JSDoc documentation
domain: app-frameworks
topic: Documentation
language: JavaScript
source: expressjs/express
updated: 2018-04-16
url: https://awesomereviewers.com/reviewers/express-accurate-jsdoc-documentation/
-->

Always ensure JSDoc comments accurately reflect the actual code implementation. Parameter types, optionality, and function behavior must be precisely documented to prevent confusion and bugs.

When documenting parameters:
- Match the exact types accepted by the function
- Indicate optional parameters appropriately
- Verify documentation when code changes

For example, if a function accepts multiple types or optional parameters:

```javascript
/**
 * Process user input
 *
 * @param {String|Array} input - The input to process
 * @param {Object} [options] - Optional configuration object
 * @return {Boolean} Whether processing succeeded
 */
function process(input, options) {
  // implementation
}
```

Incorrect or outdated JSDoc can mislead developers and lead to runtime errors. Always review JSDoc comments when changing function signatures or behavior to ensure documentation and implementation remain synchronized.
