Programming is a team sport. Comments are the notes you leave for yourself and your future teammates, ensuring the 'intent' behind your logic is never lost.
1The Annotation Protocol
JavaScript provides two primary ways to mark text as non-executable. Single-Line (//) is perfect for brief context or marking a line for deletion. **Multi-Line (/* ... */)** allows for structural explanations or temporarily disabling entire blocks of logic. Using these correctly keeps your codebase organized and understandable without affecting performance, as they are completely stripped away by the engine before execution.
2Documentation Hygiene
Professional JavaScript often uses JSDoc (comments starting with /**). These are special blocks that automated tools can parse to generate documentation websites. They also provide 'IntelliSense' in modern editors like VS Code, showing you exactly what type of data a function expects when you hover over it. Mastering these comments is a key step from 'coder' to 'engineer'.
