You use code comments when you want to add information to your code. With Swift, you can add a one-line code comment, multiple-line code comments, and even nested code comments.
One-Line Code Comments
Use the double backslashes (//) to start a one-line code comment. See Listing 4-1 as an example.
Listing 4-1. One-Line Code Comment
//One line code comment
You can fill up one line with these types of comments.
One-line comments are fine for quick notes about code that may need some extra information provided. But when you want to add a lengthier description, you can write over many lines at once. To write a multiline comment, you start the comment with a backslash and asterisk (/*), write the comment, ...