Domain:
Frontend / Backend / Code Quality
Difficulty:
Intermediate
Problem / steps to reproduce (for bugs)
- Many functions in the project currently lack proper comments or documentation.
- This makes it difficult for other developers to understand, maintain, or contribute to the codebase.
- There is no consistent pattern for function documentation across the project.
Expected outcome / task:
- Go through the entire codebase and add clear function-level documentation for all functions.
- Each function documentation should include:
- Function name
- Purpose / description of what the function does
- Parameters: names, types, and description
- Return value: type and description
- Any side effects if applicable
- Use standard commenting patterns, e.g. JSDoc for JavaScript / TypeScript: `ts /**
- Calculates the sum of two numbers.
- @param {number} a - The first number
- @param {number} b - The second number
- @returns {number} The sum of a and b */ function sum(a: number, b: number): number { return a + b; }