docs/reference/src/documentation/language/comments/index.md
There are two kinds of comments in Sway.
Regular comments are broken down into two forms of syntax:
// comment/* comment */The first form starts after the two forward slashes and continues to the end of the line.
Comments can be placed on multiple lines by starting each line with // and they can be placed at the end of some code.
{{#include ../../../code/language/comments/src/lib.sw:comment}}
Similarly, the second form continues to the end of the line and it can also be placed at the end of some code.
{{#include ../../../code/language/comments/src/lib.sw:block}}
Documentation comments start with three forward slashes /// and are placed on top of functions or above fields e.g. in a struct.
Documentation comments are typically used by tools for automatic documentation generation.
{{#include ../../../code/language/comments/src/lib.sw:documentation}}