**The correct syntax for writing comments in [[JavaScript]]**
If you want your tools to work _with_ you, use JSDoc. It is what [[Intellisense]] draws from. It enables [[TypeScript]]-like type checking regardless of whether or not you’re actually _using_ TypeScript.
Example from my [[PDW]] :
```JavaScript
/**
* Singleton pattern.
* @returns the PDW
*/
public static getInstance(): PDW {
if (!PDW.instance) {
PDW.instance = new PDW();
}
return PDW.instance;
}
```
****
# More
## Source
- [Jsdoc cheatsheet](https://devhints.io/jsdoc)
- [Use JSDoc: Index](https://jsdoc.app/)
## Related
- [[TypeScript]]
- [[Intellisense]]