Comments in Swift

Comments are used to include non-executable text in code.

  • Single line Comment begins with two forward slashes . //
  • Multiline Comment begins with a forward slash followed by an asterisk and ends with an asterisk followed by a forward slash.  /* some comments */
  • Nested Multiline Comment can include within it multiline comments and it starts with the first multiline comment block and include within it other multiline comment block. The nested comment block ends with the closing of first block . /*..first comment block starts ../*…second comment block…*/…first comment block ends*/

Leave a Reply

%d bloggers like this: